diff options
Diffstat (limited to 'tests/vm/tconstobj.nim')
-rw-r--r-- | tests/vm/tconstobj.nim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/vm/tconstobj.nim b/tests/vm/tconstobj.nim index ac7148b59..7dc20a0ba 100644 --- a/tests/vm/tconstobj.nim +++ b/tests/vm/tconstobj.nim @@ -3,6 +3,7 @@ discard """ (name: "hello") (-1, 0) (FirstName: "James", LastName: "Franco") +[1, 2, 3] ''' """ @@ -70,3 +71,25 @@ static: # issue #11861 var ifb2: InheritedFromBase initBase(ifb2) doAssert(ifb2.txt == "Initialized string from base") + + +static: # issue #15662 + proc a(T: typedesc) = echo T.type + a((int, int)) + +# bug #16069 +type + E = enum + val1, val2 + Obj = object + case k: E + of val1: + x: array[3, int] + of val2: + y: uint32 + +const + foo = [1, 2, 3] + arr = Obj(k: val1, x: foo) + +echo arr.x |