summary refs log tree commit diff stats
path: root/tests/destructor/t7346.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/destructor/t7346.nim')
-rw-r--r--tests/destructor/t7346.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/destructor/t7346.nim b/tests/destructor/t7346.nim
new file mode 100644
index 000000000..3834d39ff
--- /dev/null
+++ b/tests/destructor/t7346.nim
@@ -0,0 +1,14 @@
+discard """
+joinable: false
+"""
+
+# This bug could only be reproduced with --newruntime
+
+type
+  Obj = object
+    a: int
+
+proc `=`(a: var Obj, b: Obj) = discard
+
+let a: seq[Obj] = @[] # bug #7346
+let b = newSeq[Obj]() # bug #7345