summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-07-01 12:28:52 +0200
committerAraq <rumpf_a@web.de>2019-07-01 12:29:03 +0200
commit413dff03a085b61d5247d3a200c878d6ee2dc522 (patch)
tree5407eedc7a11f6f00479446eaeda6135a4eb281d /tests
parenta5686961bda5ecaa36d45bb2f95701977d62df4d (diff)
downloadNim-413dff03a085b61d5247d3a200c878d6ee2dc522.tar.gz
fixes #11614
Diffstat (limited to 'tests')
-rw-r--r--tests/destructor/tgcdestructors.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/destructor/tgcdestructors.nim b/tests/destructor/tgcdestructors.nim
index 36dec9326..7eb865915 100644
--- a/tests/destructor/tgcdestructors.nim
+++ b/tests/destructor/tgcdestructors.nim
@@ -9,6 +9,7 @@ ha
 a: @[4, 2, 3]
 0
 30
+true
 41 41'''
 """
 
@@ -190,6 +191,17 @@ proc mainSeqOfCap =
 
 mainSeqOfCap()
 
+# bug #11614
+
+let ga = "foo"
+
+proc takeAinArray =
+  let b = [ga]
+
+takeAinArray()
+echo ga == "foo"
+
+
 #echo s
 let (a, d) = allocCounters()
 discard cprintf("%ld %ld\n", a, d)