mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 10:52:14 +00:00
* fixes #21231; template with module as parameter elides usage/checking of module name specifier * add a test case
11 lines
154 B
Nim
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)
|