summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/compile/thygienictempl.nim8
-rw-r--r--tests/compile/toverprc.nim8
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/compile/thygienictempl.nim b/tests/compile/thygienictempl.nim
index 98983dc55..3cdbac40e 100644
--- a/tests/compile/thygienictempl.nim
+++ b/tests/compile/thygienictempl.nim
@@ -8,3 +8,11 @@ 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)
diff --git a/tests/compile/toverprc.nim b/tests/compile/toverprc.nim
index f3aa66b80..467dd36c3 100644
--- a/tests/compile/toverprc.nim
+++ b/tests/compile/toverprc.nim
@@ -25,3 +25,11 @@ var x = stdin.readline.split.map(parseInt).max
 echo x, " is the maximum!"

 echo "another number: ", takeParseInt(parseInt)

 

+
+type
+  TFoo[a,b] = object
+    lorem: a
+    ipsum: b
+
+proc bar[a,b](f: TFoo[a,b], x: a) = echo(x, " ", f.lorem, f.ipsum)
+proc bar[a,b](f: TFoo[a,b], x: b) = echo(x, " ", f.lorem, f.ipsum)