summary refs log tree commit diff stats
path: root/tests/template/thygienictempl.nim
blob: 5e4f534f84bc0c45374e8fd96103871a49c4ade7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var
  e = "abc"

raise newException(EIO, e & "ha!")

template t() = echo(foo)

var foo = 12
t()


template test_in(a, b, c: expr): bool {.immediate, dirty.} =
  var result {.gensym.}: bool = false
  false

when isMainModule:
  assert test_in(ret2, "test", str_val)