Resolved UserData not binding proper type when multiple index expressions are chained

This commit is contained in:
Deukhoofd 2018-11-30 11:12:10 +01:00
parent a4ad57e3f7
commit 9455b753a0
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 3 additions and 4 deletions

View File

@ -709,11 +709,10 @@ namespace Upsilon.Binder
return new BoundFullStopIndexExpression(expression, index, Type.Unknown, e.Span);
}
if (expression.Kind == BoundKind.VariableExpression)
var variableSymbol = ResolveVariable(expression);
if (variableSymbol != null)
{
var variableExpression = (BoundVariableExpression)expression;
var obj = variableExpression.Variable;
var functionParameter = (FunctionParameterSymbol) obj.VariableSymbol;
var functionParameter = (FunctionParameterSymbol) variableSymbol;
var udBoundDef = (UserDataBoundTypeDefinition)functionParameter.BoundTypeDefinition;
if (udBoundDef.Properties.TryGetValue(index, out var property))
{