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.nim15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/destructor/tarc.nim b/tests/destructor/tarc.nim
index 12ea46b2c..54d75a410 100644
--- a/tests/destructor/tarc.nim
+++ b/tests/destructor/tarc.nim
@@ -8,6 +8,8 @@ Hello
 2
 0
 List
+@["4", "5", "6", "", "", "a", ""]
+@["", "", "a", ""]
 '''
   cmd: '''nim c --gc:arc $file'''
 """
@@ -162,10 +164,21 @@ type
     case kind: TagKind
     of List:
       values: seq[Tag]
-    of Compound: 
+    of Compound:
       compound: Table[string, Tag]
 
 var a = Tag(kind: List)
 var b = a
 echo a.kind
 var c = a
+
+proc testAdd(i: int; yyy: openArray[string]) =
+  var x: seq[string]
+  x.add [$i, $(i+1), $(i+2)]
+  x.add yyy
+  echo x
+
+var y = newSeq[string](4)
+y[2] = "a"
+testAdd(4, y)
+echo y