mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +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);
|
assign = Toy_popLiteralArray(&interpreter->stack);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
compound = result;
|
assign = result;
|
||||||
Toy_freeLiteral(result);
|
|
||||||
|
|
||||||
//suppress the extra assign value
|
|
||||||
Toy_Literal tmp = Toy_popLiteralArray(&interpreter->stack);
|
|
||||||
Toy_freeLiteral(tmp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
third = Toy_popLiteralArray(&interpreter->stack);
|
third = Toy_popLiteralArray(&interpreter->stack);
|
||||||
@@ -1869,6 +1864,12 @@ static bool execIndexAssign(Toy_Interpreter* interpreter) {
|
|||||||
Toy_freeLiteralArray(&arguments);
|
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)) {
|
if (TOY_IS_IDENTIFIER(compoundIdn) && !Toy_setScopeVariable(interpreter->scope, compoundIdn, result, true)) {
|
||||||
interpreter->errorOutput("Incorrect type assigned to compound member ");
|
interpreter->errorOutput("Incorrect type assigned to compound member ");
|
||||||
Toy_printLiteralCustom(compoundIdn, interpreter->errorOutput);
|
Toy_printLiteralCustom(compoundIdn, interpreter->errorOutput);
|
||||||
|
|||||||
Reference in New Issue
Block a user