diff options
author | Araq <rumpf_a@web.de> | 2014-07-08 16:37:45 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-07-08 16:37:45 +0200 |
commit | 39ce17a73e1e9f9e0eea0fa885a7969c96f1a3b4 (patch) | |
tree | d8e2df9cca6a017b789a67e8486a2721da39b68b /tests/macros | |
parent | d3c79cec803dab88279e6657ccd10f612a3633c0 (diff) | |
download | Nim-39ce17a73e1e9f9e0eea0fa885a7969c96f1a3b4.tar.gz |
fixes #933
Diffstat (limited to 'tests/macros')
-rw-r--r-- | tests/macros/tbug1149.nim | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/macros/tbug1149.nim b/tests/macros/tbug1149.nim index d2bff61d3..3318fbfd8 100644 --- a/tests/macros/tbug1149.nim +++ b/tests/macros/tbug1149.nim @@ -6,7 +6,10 @@ f TTaa TTaa TTaa -TTaa''' +TTaa +true +true +nil''' output: '''test''' """ @@ -62,3 +65,16 @@ macro m(s:static[Td]) : stmt = const s=("TT", 3) m(s) m(s) + +# bug #933 + +proc nilcheck(): PNimrodNode {.compileTime.} = + echo(result == nil) # true + echo(result.isNil) # true + echo(repr(result)) # nil + +macro testnilcheck(): stmt = + result = newNimNode(nnkStmtList) + discard nilcheck() + +testnilcheck() |