mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 19:02:18 +00:00
7 lines
316 B
Nim
7 lines
316 B
Nim
# https://github.com/nim-lang/Nim/issues/13524
|
|
template fun(field): untyped = astToStr(field)
|
|
proc test1(): string = fun(nonexistant1)
|
|
proc test2[T](): string = fun(nonexistant2) # used to cause: Error: undeclared identifier: 'nonexistant2'
|
|
doAssert test1() == "nonexistant1"
|
|
doAssert test2[int]() == "nonexistant2"
|