summary refs log blame commit diff stats
path: root/tests/generics/t13525.nim
blob: 1fd84852bfbc88aefaa0c400d91852fe2f7c6e68 (plain) (tree)
1
2
3
4
5
6

                                              



                                                                                                         
# https://github.com/nim-lang/Nim/issues/13524
template fun(field): untyped = astToStr(field)
proc test1(): string = fun(nonexistent1)
proc test2[T](): string = fun(nonexistent2) # used to cause: Error: undeclared identifier: 'nonexistent2'
doAssert test1() == "nonexistent1"
doAssert test2[int]() == "nonexistent2"