Files
Nim/tests/generics/t13525.nim
Timothee Cour 78e2d299df typo: nonexistant => nonexistent (#17918)
* typo: nonexistant => nonexistent

* fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
2021-05-02 00:26:41 +02:00

7 lines
316 B
Nim

# 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"