Re: Nim 0.17.0: template with untyped argument resulting in undeclared identifier

2017-06-12 Thread mashingan
I didn't realize you can do it that way I thought it can only be used to dynamic typed lang Thanks!

Re: Nim 0.17.0: template with untyped argument resulting in undeclared identifier

2017-06-11 Thread martincohen
**Araq:** Oh yes, makes sense I worked around it exactly as you have suggested. It would probably make sense if I post this to Nim's issues as well.

Re: Nim 0.17.0: template with untyped argument resulting in undeclared identifier

2017-06-11 Thread Araq
It works when you move `template attrib` out of your generic proc `testA`. I'm still not sure it's a compiler bug The problem is the generic prepass that is supposed to prevent typos requires every identifier to be known. There is a special rule that prevents this for untyped templates but whe

Nim 0.17.0: template with untyped argument resulting in undeclared identifier

2017-06-11 Thread martincohen
Hello awesome people, I'm a newbie to Nim, and trying to rewrite my game engine to it to learn. I've encountered a strange problem with template and untyped argument. I'm not sure what exactly is going on. It feels like compiler error really, as the two examples bellow are only different on whe