Fix index error on userdata
This commit is contained in:
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user