mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Implemented typeof and added resetInterpreter()
This commit is contained in:
@@ -32,6 +32,17 @@
|
||||
assert func() == 69, "import/export of functions failed";
|
||||
}
|
||||
|
||||
//TODO: test that variables retain their types with the typeOf keyword
|
||||
//test that variables retain their types with the typeof keyword
|
||||
{
|
||||
var t: type = int;
|
||||
|
||||
export t;
|
||||
}
|
||||
|
||||
{
|
||||
import t;
|
||||
|
||||
assert typeof t == type type, "type retention failed";
|
||||
}
|
||||
|
||||
print "All good";
|
||||
|
||||
Reference in New Issue
Block a user