maybe I was not clear to begin with. the point of having an untyped argument is
_not_ to discard it I am actually writing a template where a new proc is
returned. In particular, I'll return a {.thread.} proc along with (a struct
containing) a ptr channel, so something like:
template foo(blk: untyped): typed
# do stuff
let ch = /* create ch ptr */
let task = proc() [.thread.} =
# do smth w/ ch
(ch, task)
so that I can do:
let (ch, task) = foo:
# body of my task
this was just a minimal reproducible example of the issue, which is "can't
assign the result of a template having a block parameter".
All of these seems to me like workarounds, I don't think the language is
expected the work the way it does, and if, it is, then I'd just like to know
the rationale for such a behavior
thanks!