Fix index error on userdata
This commit is contained in:
parent
16e1cde5c6
commit
160ed60cc2
|
@ -251,8 +251,16 @@ namespace Upsilon.Binder
|
||||||
{
|
{
|
||||||
if (assignment.Type == Type.Table)
|
if (assignment.Type == Type.Table)
|
||||||
{
|
{
|
||||||
var tableExpression = (BoundTableExpression) assignment;
|
if (assignment.Kind == BoundKind.BoundTableExpression)
|
||||||
variable = new TableVariableSymbol(name, isLocal, tableExpression.Expressions);
|
{
|
||||||
|
variable = new TableVariableSymbol(name, isLocal, ((BoundTableExpression)assignment).Expressions);
|
||||||
|
}
|
||||||
|
else if (assignment.Kind == BoundKind.VariableExpression)
|
||||||
|
{
|
||||||
|
variable = new TableVariableSymbol(name, isLocal,
|
||||||
|
((TableVariableSymbol) ((BoundVariableExpression) assignment).Variable.VariableSymbol)
|
||||||
|
.Variables);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue