summary refs log blame commit diff stats
path: root/tests/macros/tvarnimnode.nim
blob: 73fcc16ea96e386499188ea762b47b0fa9349b58 (plain) (tree)


















                                                 
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