mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-17 15:54:07 +10:00
Patched some very obscure bugs
This commit is contained in:
19
test/scripts/index-assignment-left-bugfix.toy
Normal file
19
test/scripts/index-assignment-left-bugfix.toy
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
|
||||
Compiler note:
|
||||
This is also to test a specific element in the compiler.
|
||||
It ensures that when doing indexing and assignment in one statement,
|
||||
the index is NOT on the right. If it is, then it is treated like a normal
|
||||
assignment.
|
||||
|
||||
*/
|
||||
|
||||
//polyfill the _insert function
|
||||
var a = [1, 2, 3];
|
||||
|
||||
var b = a[1];
|
||||
|
||||
assert b == 2, "index assignment left failed";
|
||||
|
||||
|
||||
print "All good";
|
||||
Reference in New Issue
Block a user