Files
Nim/tests/template/t21231.nim
ringabout ac7b8b678c 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
2023-06-21 16:30:55 +02:00

11 lines
154 B
Nim

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)