summary refs log tree commit diff stats
path: root/tests/template/thygienictempl.nim
blob: 9020c3e28eab92bbfd053d191fb5d9103fea7e11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
discard """
action: compile
"""


var
  e = "abc"

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

template t() = echo(foo)

var foo = 12
t()


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

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