fixes #926
This commit is contained in:
parent
350a49cc26
commit
3ec2973875
2 changed files with 31 additions and 7 deletions
19
tests/macros/tvarnimnode.nim
Normal file
19
tests/macros/tvarnimnode.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
discard """
|
||||
output: 10
|
||||
"""
|
||||
|
||||
#bug #926
|
||||
|
||||
import macros
|
||||
|
||||
proc test(f: var PNimrodNode) {.compileTime.} =
|
||||
f = newNimNode(nnkStmtList)
|
||||
f.add newCall(newIdentNode("echo"), newLit(10))
|
||||
|
||||
macro blah(prc: stmt): stmt =
|
||||
result = prc
|
||||
|
||||
test(result)
|
||||
|
||||
proc test() {.blah.} =
|
||||
echo 5
|
||||
Loading…
Add table
Add a link
Reference in a new issue