@cblake As I've explained, this has nothing to do with shadowing, which _only_ 
has to do with scope 
([https://en.wikipedia.org/wiki/Variable_shadowing)](https://en.wikipedia.org/wiki/Variable_shadowing\)).

What's actually going on is that, once an inject is done in a proc in a 
template, any (textually) later uses of that symbol in that template are taken 
to be injected, even when in the scope of a gensym declaration. So in for x in 
[1]: echo x, the first x is declared as gensym but the second one is marked as 
injected so it produces an "undeclared" error since it has a different name.

The bug is filed as 
[https://github.com/nim-lang/Nim/issues/14620](https://github.com/nim-lang/Nim/issues/14620),
 which is a dup of 
[https://github.com/nim-lang/Nim/issues/10609](https://github.com/nim-lang/Nim/issues/10609)
 (thanks, Danil Yarantsev, for discovering that.)

@Araq This bug is rather inconsequential and trivial to work around ... I'm 
certainly not waiting on a fix.

Reply via email to