summary refs log tree commit diff stats
path: root/tests/generics/t13525.nim
blob: d1b8df78c1dbf72d9e209a4cccf9817c543f11e7 (plain) (blame)
1
2
3
4
5
6
# 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"