summary refs log tree commit diff stats
path: root/tests/template
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-11-23 01:45:53 +0100
committerAraq <rumpf_a@web.de>2014-11-23 01:45:53 +0100
commite1630dcc73f13023205d45cab7bcabc415766b66 (patch)
tree0134e91e31cc5f553909b0adcb03572054826466 /tests/template
parent83c655266dd1f9ba3ddbdf9389edbce4d30740a3 (diff)
downloadNim-e1630dcc73f13023205d45cab7bcabc415766b66.tar.gz
fixes #1337
Diffstat (limited to 'tests/template')
-rw-r--r--tests/template/tit.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/template/tit.nim b/tests/template/tit.nim
new file mode 100644
index 000000000..9866711de
--- /dev/null
+++ b/tests/template/tit.nim
@@ -0,0 +1,11 @@
+
+# bug #1337
+
+template someIt(a, pred: expr): expr =
+  var it {.inject.} = 0
+  pred
+
+proc aProc(n) =
+  n.someIt(echo(it))
+
+aProc(89)