diff options
Diffstat (limited to 'tests/template/tprocparshadow.nim')
-rw-r--r-- | tests/template/tprocparshadow.nim | 11 |
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) |