summary refs log blame commit diff stats
path: root/tests/vm/teval1.nim
blob: 1d3a68a0d72b1ed5cb392ceec231a3cc01cd1778 (plain) (tree)
1
2
3
4
5
6
7
8






                                       
                                           






                                    
 

                  




                            
 
import macros

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

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

const
  x = testProc()

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

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