summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-05-06 21:42:41 +0200
committerAraq <rumpf_a@web.de>2019-05-06 21:42:49 +0200
commit2475d92c36e26e44372175c2cf4c21fbab084619 (patch)
treed05c6c9ddca92655dc36cdae5d3aaf52f23c31d0 /tests
parenta85d3879282a15e85ce9dd18b9a5bf020096a76c (diff)
downloadNim-2475d92c36e26e44372175c2cf4c21fbab084619.tar.gz
fixes #10192
Diffstat (limited to 'tests')
-rw-r--r--tests/template/tparams_gensymed.nim20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/template/tparams_gensymed.nim b/tests/template/tparams_gensymed.nim
index 91fa26596..b19ed7afc 100644
--- a/tests/template/tparams_gensymed.nim
+++ b/tests/template/tparams_gensymed.nim
@@ -110,3 +110,23 @@ implementUnary(): x*x
 
 registerInstantiation(int)
 registerInstantiation(float)
+
+# bug #10192
+template nest(body) {.dirty.} =
+  template p1(b1: untyped) {.dirty, used.} =
+    template implp1: untyped {.dirty.} = b1
+  template p2(b2: untyped) {.dirty, used.} =
+    template implp2: untyped {.dirty.} = b2
+
+  body
+  implp1
+  implp2
+
+template test() =
+  nest:
+    p1:
+      var foo = "bar"
+    p2:
+      doAssert(foo.len == 3)
+
+test()