From fee71d466cdb7cda96b55592abbf7d433639ab51 Mon Sep 17 00:00:00 2001 From: cooldome Date: Mon, 11 May 2020 18:10:54 +0100 Subject: fix #14294 (#14301) * fix #14294 * fix orc as well Co-authored-by: cooldome --- tests/destructor/tarc.nim | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'tests/destructor/tarc.nim') diff --git a/tests/destructor/tarc.nim b/tests/destructor/tarc.nim index 1acc95fad..12ea46b2c 100644 --- a/tests/destructor/tarc.nim +++ b/tests/destructor/tarc.nim @@ -6,7 +6,9 @@ Success Hello 1 2 -0''' +0 +List +''' cmd: '''nim c --gc:arc $file''' """ @@ -145,3 +147,25 @@ proc bug13105 = bug13105() echo getOccupiedMem() - startMem + + +#------------------------------------------------------------------------------ +# issue #14294 + +import tables + +type + TagKind = enum + List = 0, Compound + + Tag = object + case kind: TagKind + of List: + values: seq[Tag] + of Compound: + compound: Table[string, Tag] + +var a = Tag(kind: List) +var b = a +echo a.kind +var c = a -- cgit 1.4.1-2-gfad0