mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Added mustfail test, fixed compound type decl bug
This commit is contained in:
7
test/scripts/mustfail/declare-types-array.toy
Normal file
7
test/scripts/mustfail/declare-types-array.toy
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
var t = astype [int];
|
||||
var arr: t = [1, 2, 3.14];
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
7
test/scripts/mustfail/declare-types-dictionary.toy
Normal file
7
test/scripts/mustfail/declare-types-dictionary.toy
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
var t = astype [string:int];
|
||||
var dict: t = ["one": 1, "two": 2, "pi": 3.14];
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
Reference in New Issue
Block a user