summary refs log tree commit diff stats
path: root/tests/vm/teval1.nim
blob: 0eaa050da63d83de90ebd55e6f78c3471fd336d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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()

echo "##", x, "##"

# bug #1310
static:
    var i, j: set[int8] = {}
    var k = i + j