diff options
author | Oscar NihlgÄrd <oscarnihlgard@gmail.com> | 2018-06-30 09:16:46 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-06-30 09:16:46 +0200 |
commit | d146045ed55a45428991ece55e13afb742b2fdc4 (patch) | |
tree | da972bf0a73307e85c7bc39c88d9a9a5719a87bf /tests | |
parent | 0a14b3d1980e116bd40a98d5d2b414a0e1d05a1c (diff) | |
download | Nim-d146045ed55a45428991ece55e13afb742b2fdc4.tar.gz |
Fixes #6689 (#8135)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vm/tvmmisc.nim | 17 |
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" |