summary refs log tree commit diff stats
path: root/tests/template/thygienictempl.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/template/thygienictempl.nim')
-rw-r--r--tests/template/thygienictempl.nim18
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)