Closed timotheecour closed 3 years ago
Ah, thanks a lot. This is a left over from refactoring out some parts. Surprising that the code works in the first place though.
At the same time, this isn't an implicit (obv. not explicit) generic proc. Does the static argument have the same effect? I suppose it's similar as it also means there will be different instantiated procs.
Surprising that the code works in the first place though.
it won't after https://github.com/nim-lang/Nim/pull/18050
this isn't an implicit (obv. not explicit) generic proc.
it's a generic proc because of the static param, eg:
proc fn(a: int, b: static bool = true) =
static: echo ("instantiating fn", b)
fn(1)
fn(2, true)
fn(3, false)
prints: ("instantiating fn", true) ("instantiating fn", false)
unblocks https://github.com/nim-lang/Nim/pull/18050