Closed SirNickolas closed 11 months ago
this is a Nim bug that has been fixed in more recent versions, see https://github.com/nim-lang/Nim/issues/22198
Thanks for reporting it. I’m afraid, there’s no much we can do with it then. I think I’ll just write in the Readme that it has been fixed in Nim 2.0.
In some cases, when generating an
.async
procedure by a macro, you get the aforementioned error. Example:(The last test confuses me the most, to be honest.) The error is caused by these lines:
https://github.com/status-im/nim-chronos/blob/f3b77d86615813690c5ab5e7cbe841521be2a20f/chronos/asyncmacro2.nim#L250-L251
Could you explain their meaning please?
Any ideas on how to make the example compileable are much appreciated. (Checking if
tree
is annnkStmtList
and, if not, rewriting tobindSym"turnIntoProc".newCall newStmtList tree
doesn’t work. Even withtree.copyNimTree
.)Chronos 3.0.11, Nim 1.6.10.