summary refs log tree commit diff stats
path: root/tests/template
diff options
context:
space:
mode:
authorLolo Iccl <oxisccl@gmail.com>2017-01-19 05:04:03 +0900
committerAndreas Rumpf <rumpf_a@web.de>2017-01-18 21:04:03 +0100
commita296f091e456b706dab52916da4ad73f308a2345 (patch)
treef6784af013c01bf301c121143df3ac3b95467d48 /tests/template
parentfe0291f12708edd0c85ac53b3bd84a3411b8dfae (diff)
downloadNim-a296f091e456b706dab52916da4ad73f308a2345.tar.gz
Fixes #5225 (#5243)
* Fixes #5225

* Fixes #5225

* Fixes #5225

fix typo
Diffstat (limited to 'tests/template')
-rw-r--r--tests/template/tprocparshadow.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/template/tprocparshadow.nim b/tests/template/tprocparshadow.nim
new file mode 100644
index 000000000..b99cd0b6c
--- /dev/null
+++ b/tests/template/tprocparshadow.nim
@@ -0,0 +1,11 @@
+discard """
+  output: "10"
+"""
+
+template something(name: untyped) =
+  proc name(x: int) =
+    var x = x # this one should not be rejected by the compiler (#5225)
+    echo x
+
+something(what)
+what(10)