summary refs log tree commit diff stats
path: root/tests/vm
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-11-28 10:11:25 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-11-28 23:00:34 +0100
commit87f0d534d6da2e8a7dc390e47ba60ca4d8bfb759 (patch)
tree32ed920c2a6e178462b4f95e0506c7dc5905ada6 /tests/vm
parent2dea9203791996f1c946c8f4708dc8ca5342180b (diff)
downloadNim-87f0d534d6da2e8a7dc390e47ba60ca4d8bfb759.tar.gz
fixes #12488 [backport]
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/tmisc_vm.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/vm/tmisc_vm.nim b/tests/vm/tmisc_vm.nim
index a9a30568d..6eeecb869 100644
--- a/tests/vm/tmisc_vm.nim
+++ b/tests/vm/tmisc_vm.nim
@@ -15,6 +15,9 @@ Done!
 foo4
 foo4
 foo4
+(a: 0, b: 0)
+(a: 0, b: 0)
+(a: 0, b: 0)
 '''
 """
 
@@ -234,3 +237,17 @@ static:
   echo foo()
   echo foo()
   echo foo()
+
+# bug #12488
+type
+  MyObject = object
+    a,b: int
+  MyObjectRef = ref MyObject
+
+static:
+  let x1 = new(MyObject)
+  echo x1[]
+  let x2 = new(MyObjectRef)
+  echo x2[]
+  let x3 = new(ref MyObject) # cannot generate VM code for ref MyObject
+  echo x3[]