summary refs log tree commit diff stats
path: root/tests/destructor/tarc.nim
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2020-05-11 18:10:54 +0100
committerGitHub <noreply@github.com>2020-05-11 19:10:54 +0200
commitfee71d466cdb7cda96b55592abbf7d433639ab51 (patch)
tree201ffd746d8ff54e87f94d77dfa246dffd05d27d /tests/destructor/tarc.nim
parent03c146cd93ba48f7e8cab05e6214c8675d0dd1f9 (diff)
downloadNim-fee71d466cdb7cda96b55592abbf7d433639ab51.tar.gz
fix #14294 (#14301)
* fix #14294

* fix orc as well

Co-authored-by: cooldome <ariabushenko@bk.ru>
Diffstat (limited to 'tests/destructor/tarc.nim')
-rw-r--r--tests/destructor/tarc.nim26
1 files changed, 25 insertions, 1 deletions
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