mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Testing an obscure bugfix
This commit is contained in:
@@ -1767,12 +1767,7 @@ static bool execIndexAssign(Toy_Interpreter* interpreter) {
|
||||
assign = Toy_popLiteralArray(&interpreter->stack);
|
||||
}
|
||||
else {
|
||||
compound = result;
|
||||
Toy_freeLiteral(result);
|
||||
|
||||
//suppress the extra assign value
|
||||
Toy_Literal tmp = Toy_popLiteralArray(&interpreter->stack);
|
||||
Toy_freeLiteral(tmp);
|
||||
assign = result;
|
||||
}
|
||||
|
||||
third = Toy_popLiteralArray(&interpreter->stack);
|
||||
@@ -1869,6 +1864,12 @@ static bool execIndexAssign(Toy_Interpreter* interpreter) {
|
||||
Toy_freeLiteralArray(&arguments);
|
||||
}
|
||||
|
||||
//BUGFIX: make sure the compound name can be assigned
|
||||
if (TOY_IS_NULL(compoundIdn)) {
|
||||
compoundIdn = Toy_popLiteralArray(&interpreter->stack);
|
||||
freeIdn = true;
|
||||
}
|
||||
|
||||
if (TOY_IS_IDENTIFIER(compoundIdn) && !Toy_setScopeVariable(interpreter->scope, compoundIdn, result, true)) {
|
||||
interpreter->errorOutput("Incorrect type assigned to compound member ");
|
||||
Toy_printLiteralCustom(compoundIdn, interpreter->errorOutput);
|
||||
|
||||
Reference in New Issue
Block a user