mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Fixed type variable evaluation, it now occurs at var definition
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
|
||||
|
||||
var t: type = typeas [[int]];
|
||||
|
||||
var a: t = [
|
||||
[1, 2, 3]
|
||||
];
|
||||
|
||||
print a;
|
||||
print typeof a;
|
||||
var t: type = typeas [int];
|
||||
var u: type = typeas [t];
|
||||
|
||||
var a: u;
|
||||
|
||||
t = typeas [float]; //redefnition
|
||||
|
||||
var b: u;
|
||||
|
||||
print typeof a; //<[<int>]>
|
||||
print typeof b; //<[<float>]>
|
||||
Reference in New Issue
Block a user