diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-06-21 22:30:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 16:30:55 +0200 |
commit | ac7b8b678c9e8eff70bb8147d411664470a882fd (patch) | |
tree | 4759d2cf0287670aa6042f4de6c91f3f088f464a /tests/template | |
parent | eb2f0353bcf46cd250c6bdd7b754904feef3df8a (diff) | |
download | Nim-ac7b8b678c9e8eff70bb8147d411664470a882fd.tar.gz |
fixes #21231; template with module as parameter elides usage/checking of module name specifier (#22109)
* fixes #21231; template with module as parameter elides usage/checking of module name specifier * add a test case
Diffstat (limited to 'tests/template')
-rw-r--r-- | tests/template/t21231.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/template/t21231.nim b/tests/template/t21231.nim new file mode 100644 index 000000000..51e96cdd6 --- /dev/null +++ b/tests/template/t21231.nim @@ -0,0 +1,10 @@ +discard """ + errormsg: "undeclared identifier: 'x'" +""" + +var x: int +# bug #21231 +template f(y: untyped) = echo y.x +for i in 1 .. 10: + x = i + f(system) |