From d146045ed55a45428991ece55e13afb742b2fdc4 Mon Sep 17 00:00:00 2001 From: Oscar NihlgÄrd Date: Sat, 30 Jun 2018 09:16:46 +0200 Subject: Fixes #6689 (#8135) --- tests/vm/tvmmisc.nim | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tests/vm') 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" -- cgit 1.4.1-2-gfad0