mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Resolved #25, Indexing an array with a non-integer causes an error
This commit is contained in:
7
test/scripts/mustfail/index-arrays-non-integer.toy
Normal file
7
test/scripts/mustfail/index-arrays-non-integer.toy
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
var a: [int] = [1, 2, 3];
|
||||
print a[a];
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
@@ -130,6 +130,7 @@ int main() {
|
||||
"declare-types-array.toy",
|
||||
"declare-types-dictionary-key.toy",
|
||||
"declare-types-dictionary-value.toy",
|
||||
"index-arrays-non-integer.toy",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user