Fixed a bug in for-loops when compound is modified

It's a simple fix, but it's basically just shadowing the compound's
name:

  var array = [1];
  for (var i in array) array.pushBack(i); //this will fail
This commit is contained in:
2026-05-24 19:45:28 +10:00
parent 254aceadfc
commit e59bcd0572
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -482,6 +482,7 @@ static void processEliminate(Toy_VM* vm) {
}
static void processIterate(Toy_VM* vm) {
//URGENT: finish this
//ITERATE on [-2] based on type, with [-1] as counter
//then delegate to processJump