summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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