diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-11-24 16:09:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-24 16:09:00 +0100 |
commit | d306a04466b7f1129620dc3ab35443119ed4c867 (patch) | |
tree | f8666399ac3c75829617ba3b0e451792d5b27b6f /tests/vm | |
parent | 1d14b2c9e61c5e9389f8b52839814156dcf259dd (diff) | |
download | Nim-d306a04466b7f1129620dc3ab35443119ed4c867.tar.gz |
fixes #16069; [backport:1.2] [backport:1.4] (#16115)
* fixes #16069; refs https://github.com/nim-lang/RFCs/issues/257 [backport:1.2] [backport:1.4] * make tests green again
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/tconstobj.nim | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/vm/tconstobj.nim b/tests/vm/tconstobj.nim index 93d0e1d7d..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] ''' """ @@ -74,4 +75,21 @@ static: # issue #11861 static: # issue #15662 proc a(T: typedesc) = echo T.type - a((int, int)) \ No newline at end of file + 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 |