summary refs log tree commit diff stats
path: root/tests/destructor/tarc.nim
diff options
context:
space:
mode:
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