summary refs log blame commit diff stats
path: root/tests/accept/compile/teval1.nim
blob: 8172ebe281023b957c450e50f0be7c0012c2117e (plain) (tree)


















                                       
import macros

proc testProc: string {.compileTime.} =
  result = ""
  result = result & ""

when true:
  macro test(n: stmt): stmt =
    result = newNimNode(nnkStmtList)
    echo "#", testProc(), "#"
  test:
    "hi"

const
  x = testProc()
  
echo "##", x, "##"