mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Fixed nested assignment bug
This commit is contained in:
@@ -27,4 +27,17 @@
|
||||
assert d[first] == 2, "indexing with variables failed";
|
||||
}
|
||||
|
||||
|
||||
//test nested indexing
|
||||
{
|
||||
var d = ["foo": ["bar": 0]];
|
||||
|
||||
d["foo"]["bar"] = 42;
|
||||
|
||||
print d;
|
||||
|
||||
assert d == ["foo": ["bar": 42]], "nested indexing failed";
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
|
||||
Reference in New Issue
Block a user