diff --git a/Upsilon/Binder/Binder.cs b/Upsilon/Binder/Binder.cs index f3a80b9..3466041 100644 --- a/Upsilon/Binder/Binder.cs +++ b/Upsilon/Binder/Binder.cs @@ -322,10 +322,6 @@ namespace Upsilon.Binder { var fullStopIndexExpression = (BoundFullStopIndexExpression) expression; var indexerExpression = fullStopIndexExpression.Expression; - if (indexerExpression.Type == Type.Unknown) - { - return new VariableSymbol(fullStopIndexExpression.Index, Type.Unknown, true); - } var indexerVariable = ResolveVariable(indexerExpression, diagnostics); if (indexerVariable == null) { @@ -369,6 +365,10 @@ namespace Upsilon.Binder { return new VariableSymbol("", expression.Type, true); } + else if (expression.Type == Type.Unknown) + { + return new VariableSymbol("", Type.Unknown, true); + } return null; }