summary refs log tree commit diff stats
path: root/tests/vm/tvmmisc.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/tvmmisc.nim')
-rw-r--r--tests/vm/tvmmisc.nim17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/vm/tvmmisc.nim b/tests/vm/tvmmisc.nim
index 7e4af8b75..d82c2cf5e 100644
--- a/tests/vm/tvmmisc.nim
+++ b/tests/vm/tvmmisc.nim
@@ -91,6 +91,21 @@ block:
       result = size
     doAssert f(4) == 4
 
+# #6689
+block:
+  static:
+    proc foo(): int = 0
+    var f: proc(): int
+    doAssert f.isNil
+    f = foo
+    doAssert(not f.isNil)
+
+block:
+  static:
+    var x: ref ref int
+    new(x)
+    doAssert(not x.isNil)
+
 # #7871
 static:
   type Obj = object
@@ -119,4 +134,4 @@ static:
   o.names = ""
   o.pushName()
   o.pushName()
-  doAssert o.names == "FOOBARFOOBAR"
\ No newline at end of file
+  doAssert o.names == "FOOBARFOOBAR"