mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Fixed a segfault
This commit is contained in:
2
test/scripts/mustfail/bad-function-identifier.toy
Normal file
2
test/scripts/mustfail/bad-function-identifier.toy
Normal file
@@ -0,0 +1,2 @@
|
||||
1.type();
|
||||
|
||||
@@ -2,6 +2,3 @@
|
||||
var t = astype [int];
|
||||
var arr: t = [1, 2, 3.14];
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
|
||||
@@ -2,6 +2,3 @@
|
||||
var t = astype [string:int];
|
||||
var dict: t = ["one": 1, "two": 2, 3:4];
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
|
||||
@@ -2,6 +2,3 @@
|
||||
var t = astype [string:int];
|
||||
var dict: t = ["one": 1, "two": 2, "pi": 3.14];
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
|
||||
@@ -2,6 +2,3 @@
|
||||
var a: [int] = [1, 2, 3];
|
||||
print a[a];
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{
|
||||
var s = "foo" - "bar";
|
||||
}
|
||||
|
||||
print "All good";
|
||||
|
||||
@@ -96,6 +96,7 @@ int main() {
|
||||
//run each file in tests/scripts/
|
||||
char* filenames[] = {
|
||||
"access-parent-directory.toy",
|
||||
"bad-function-identifier.toy",
|
||||
"declare-types-array.toy",
|
||||
"declare-types-dictionary-key.toy",
|
||||
"declare-types-dictionary-value.toy",
|
||||
|
||||
Reference in New Issue
Block a user