summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-10-10 10:00:41 +0200
committerAraq <rumpf_a@web.de>2019-10-10 10:00:57 +0200
commit7f904e2c663163e327cbe784a982ac2af8bbd6f3 (patch)
tree769cd0917287134a889f18b811b545d142f1e534 /tests
parent3b1760df7265309f75c8cce4e9a34d928bea69e6 (diff)
downloadNim-7f904e2c663163e327cbe784a982ac2af8bbd6f3.tar.gz
fixes #12244 [backport]
Diffstat (limited to 'tests')
-rw-r--r--tests/vm/tmisc_vm.nim20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/vm/tmisc_vm.nim b/tests/vm/tmisc_vm.nim
index 7733314db..7d7275426 100644
--- a/tests/vm/tmisc_vm.nim
+++ b/tests/vm/tmisc_vm.nim
@@ -1,6 +1,8 @@
 discard """
   output: '''[127, 127, 0, 255]
 [127, 127, 0, 255]
+
+(data: 1)
 '''
 
   nimout: '''caught Exception
@@ -180,3 +182,21 @@ static:
   var stream = initCtsStream(file)
   parseAtlas(stream)
   echo "Done!"
+
+
+# bug #12244
+
+type
+  Apple = object
+    data: int
+
+func what(x: var Apple) =
+  x = Apple(data: 1)
+
+func oh_no(): Apple =
+  what(result)
+
+const
+  vmCrash = oh_no()
+
+debugEcho vmCrash