Better handling of unknown indexing
This commit is contained in:
parent
cd140603dd
commit
0a8648ce80
|
@ -322,10 +322,6 @@ namespace Upsilon.Binder
|
||||||
{
|
{
|
||||||
var fullStopIndexExpression = (BoundFullStopIndexExpression) expression;
|
var fullStopIndexExpression = (BoundFullStopIndexExpression) expression;
|
||||||
var indexerExpression = fullStopIndexExpression.Expression;
|
var indexerExpression = fullStopIndexExpression.Expression;
|
||||||
if (indexerExpression.Type == Type.Unknown)
|
|
||||||
{
|
|
||||||
return new VariableSymbol(fullStopIndexExpression.Index, Type.Unknown, true);
|
|
||||||
}
|
|
||||||
var indexerVariable = ResolveVariable(indexerExpression, diagnostics);
|
var indexerVariable = ResolveVariable(indexerExpression, diagnostics);
|
||||||
if (indexerVariable == null)
|
if (indexerVariable == null)
|
||||||
{
|
{
|
||||||
|
@ -369,6 +365,10 @@ namespace Upsilon.Binder
|
||||||
{
|
{
|
||||||
return new VariableSymbol("", expression.Type, true);
|
return new VariableSymbol("", expression.Type, true);
|
||||||
}
|
}
|
||||||
|
else if (expression.Type == Type.Unknown)
|
||||||
|
{
|
||||||
|
return new VariableSymbol("", Type.Unknown, true);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue