Must force a type when dealing with compound types

This commit is contained in:
2022-08-22 14:27:41 +01:00
parent 300f8e382b
commit 5b82ed8e45
4 changed files with 26 additions and 13 deletions

View File

@@ -7,14 +7,15 @@ assert u == 42, "first-class types are screwing with values";
//differentiate by the "type" value
var v: type = [int]; //TODO: still can't check for this
var v: type = type [int];
var w = [int];
var x = v;
assert w == [int], "defining an array of types failed";
assert x == type [int], "re-assigning a type value failed";
//complex type
var complex: type = [string, [int]];
var complex: type = type [string, [int]];
var dict: complex = [
"first array": [1, 2, 3],
"second array": [4, 5, 6],