Open yglukhov opened 3 years ago
It seems the problem appears only when replacing the sym in echo
. If echo
is changed to a non-magic function, the code will work (with some modifications, as it only works with echo-specific ast)
likely duplicate of https://github.com/nim-lang/Nim/issues/18561 (https://github.com/nim-lang/Nim/issues/18561 has more info)
nkHiddenCallConv
is entirely ignored in semchecking, hence its children including the gensym symbol aren't typed.
The crash will happen after macro evaluation.
repr result
at the end of the macro looks valid to me. If you comment the "crash" line in the sample, there will be ICEError: internal error: genRecordFieldAux
. Therepr result
is slightly different but still valid.