This code produces the very surprising message x.nim(9, 1) template/generic instantiation of `t` from here x.nim(7, 9) Error: undeclared identifier: 'x' The error is for bod(x) If I change the for loop variable to anything other than x, it works. If this is indeed a bug, what title should I file it under? .. code-block:: nim template t(body: untyped) = proc bod(a: int) = let x {.inject.} = a body for x in [1]: bod(x) t: echo x
- bizarre name clash with template jibal