summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/destructor/tgcdestructors.nim22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/destructor/tgcdestructors.nim b/tests/destructor/tgcdestructors.nim
index c0a88e650..bc9f57d20 100644
--- a/tests/destructor/tgcdestructors.nim
+++ b/tests/destructor/tgcdestructors.nim
@@ -5,7 +5,8 @@ ho
 ha
 @["arg", "asdfklasdfkl", "asdkfj", "dfasj", "klfjl"]
 @[1, 2, 3]
-25 25'''
+@["red", "yellow", "orange", "rtrt1", "pink"]
+30 30'''
 """
 
 import allocators
@@ -139,7 +140,7 @@ type
   Obj* = object
     f*: seq[int]
 
-method main(o: Obj) =
+method main(o: Obj) {.base.} =
   for newb in o.f:
     discard
 
@@ -151,6 +152,23 @@ proc testforNoMove =
 
 testforNoMove()
 
+# bug #11065
+type
+  Warm = seq[string]
+
+proc testWarm =
+  var w: Warm
+  w = @["red", "yellow", "orange"]
+
+  var x = "rt"
+  var y = "rt1"
+  w.add(x & y)
+
+  w.add("pink")
+  echo w
+
+testWarm()
+
 #echo s
 let (a, d) = allocCounters()
 discard cprintf("%ld %ld\n", a, d)
-20 14:00:04 +0200 removed flawed thread analysis pass' href='/ahoang/Nim/commit/tests/bind/tnicerrorforsymchoice.nim?h=devel&id=be6474af638b72aabeb70cfc5f477cc5fb7af0ce'>be6474af6 ^
fc76c93a1 ^
ed56b8c17 ^
be6474af6 ^
ed56b8c17 ^
fc76c93a1 ^
ed56b8c17 ^
be6474af6 ^
ed56b8c17 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23