diff options
Diffstat (limited to 'tests/template/thygienictempl.nim')
-rw-r--r-- | tests/template/thygienictempl.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/template/thygienictempl.nim b/tests/template/thygienictempl.nim new file mode 100644 index 000000000..3cdbac40e --- /dev/null +++ b/tests/template/thygienictempl.nim @@ -0,0 +1,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) |