Files
Nim/tests/template/tinnerouterproc.nim
metagn f35c9cf73d fix #20002 (#20004)
While this fix seems innocent,
this unlocks the hidden behavior of
method calls not being able to call
gensym'ed routines inside templates.
2022-07-15 12:37:08 +02:00

9 lines
225 B
Nim

block: # #20002
proc bar(x: int): int = 10
template foo =
proc bar(x: int): int {.gensym.} = x + 2
doAssert bar(3) == 5
discard 3.bar # evaluates to 10 but only check if it compiles for now
block:
foo()