Fixes tests
This commit is contained in:
parent
af0ff235e1
commit
c1f4c8fb37
|
@ -277,8 +277,11 @@ namespace Upsilon.Binder
|
||||||
{
|
{
|
||||||
var fullStopIndexExpression = (BoundFullStopIndexExpression) expression;
|
var fullStopIndexExpression = (BoundFullStopIndexExpression) expression;
|
||||||
var indexerExpression = fullStopIndexExpression.Expression;
|
var indexerExpression = fullStopIndexExpression.Expression;
|
||||||
var indexerVariable = (TableVariableSymbol)ResolveVariable(indexerExpression);
|
var indexerVariable = ResolveVariable(indexerExpression);
|
||||||
return indexerVariable.Variables[fullStopIndexExpression.Index];
|
if (indexerVariable.Type == Type.Table)
|
||||||
|
{
|
||||||
|
return ((TableVariableSymbol)indexerVariable).Variables[fullStopIndexExpression.Index];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,4 +63,16 @@ namespace Upsilon.Binder
|
||||||
Variables = variables;
|
Variables = variables;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class UserDataVariableSymbol : VariableSymbol
|
||||||
|
{
|
||||||
|
public BoundTypeDefinition BoundTypeDefinition { get; }
|
||||||
|
|
||||||
|
public UserDataVariableSymbol(string name, bool local, BoundTypeDefinition boundTypeDefinition)
|
||||||
|
:base (name, Type.UserData, local)
|
||||||
|
{
|
||||||
|
BoundTypeDefinition = boundTypeDefinition;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue