summary refs log tree commit diff stats
path: root/tests/ccgbugs
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-05-10 11:43:49 +0200
committerAraq <rumpf_a@web.de>2019-05-10 11:43:58 +0200
commit22881a3543334cdf73fcfa3da5ebfbbd4f9f92f2 (patch)
treec803c7ba4a651811609c6f28834ed7c157e8995b /tests/ccgbugs
parentde5c0d3aa9fd713a698f7f596c9bf925d00729c2 (diff)
downloadNim-22881a3543334cdf73fcfa3da5ebfbbd4f9f92f2.tar.gz
closes #9825
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r--tests/ccgbugs/twrongrefcounting.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ccgbugs/twrongrefcounting.nim b/tests/ccgbugs/twrongrefcounting.nim
index c0c3e0fc2..8ebaf4058 100644
--- a/tests/ccgbugs/twrongrefcounting.nim
+++ b/tests/ccgbugs/twrongrefcounting.nim
@@ -2,6 +2,17 @@ discard """
   output: '''ok'''
   cmd: "nim c -r --gc:refc -d:useGcAssert -d:useSysAssert -d:fulldebug -d:smokeCycles $file"
 """
+
+# bug #9825
+func empty(T: typedesc): T = discard
+const emptyChunk = @(empty(array[10, byte]))
+
+var lst: seq[seq[byte]]
+lst.add emptyChunk
+
+doAssert($lst == "@[@[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]")
+
+
 # bug #6234
 type
     Foo = ref object