t13525.nim 316 B

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