mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 19:52:36 +00:00
28 lines
361 B
Nim
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
|