mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
20 lines
275 B
Nim
20 lines
275 B
Nim
discard """
|
|
output: 10
|
|
"""
|
|
|
|
#bug #926
|
|
|
|
import macros
|
|
|
|
proc test(f: var NimNode) {.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
|