mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Types are first-class citizens
This commit is contained in:
7
test/type-type.toy
Normal file
7
test/type-type.toy
Normal file
@@ -0,0 +1,7 @@
|
||||
var t: type = int;
|
||||
var u: t = 42;
|
||||
|
||||
assert t == int, "types are not first class";
|
||||
assert u == 42, "first-class types are screwing with values";
|
||||
|
||||
print "All good";
|
||||
Reference in New Issue
Block a user