Resolved UserData not binding proper type when multiple index expressions are chained
This commit is contained in:
parent
a4ad57e3f7
commit
9455b753a0
|
@ -709,11 +709,10 @@ namespace Upsilon.Binder
|
||||||
return new BoundFullStopIndexExpression(expression, index, Type.Unknown, e.Span);
|
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 functionParameter = (FunctionParameterSymbol) variableSymbol;
|
||||||
var obj = variableExpression.Variable;
|
|
||||||
var functionParameter = (FunctionParameterSymbol) obj.VariableSymbol;
|
|
||||||
var udBoundDef = (UserDataBoundTypeDefinition)functionParameter.BoundTypeDefinition;
|
var udBoundDef = (UserDataBoundTypeDefinition)functionParameter.BoundTypeDefinition;
|
||||||
if (udBoundDef.Properties.TryGetValue(index, out var property))
|
if (udBoundDef.Properties.TryGetValue(index, out var property))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue