Files
Nim/tests/vm/teval1.nim
2018-11-23 11:58:28 +01:00

28 lines
361 B
Nim

discard """
nimout: "##"
"""
import macros
proc testProc: string {.compileTime.} =
result = ""
result = result & ""
when true:
macro test(n: untyped): untyped =
result = newNimNode(nnkStmtList)
echo "#", testProc(), "#"
test:
"hi"
const
x = testProc()
doAssert x == ""
# bug #1310
static:
var i, j: set[int8] = {}
var k = i + j