mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-18 00:04:09 +10:00
Patched some very obscure bugs
This commit is contained in:
15
test/scripts/index-assignment-both-bugfix.toy
Normal file
15
test/scripts/index-assignment-both-bugfix.toy
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
|
||||
This ensures that when indexing on both sides of an assignment,
|
||||
it works correctly.
|
||||
|
||||
*/
|
||||
|
||||
var a = [1, 2, 3];
|
||||
var b = [4, 5, 6];
|
||||
|
||||
a[1] = b[1];
|
||||
|
||||
assert a == [1, 5, 3], "index assignment both failed";
|
||||
|
||||
print "All good";
|
||||
Reference in New Issue
Block a user