Open rehartmann opened 5 years ago
The problem disappears if the definition of myUpdate is changed to:
macro myUpdate*(dest: untyped, cond: Expression,
attrUpdates: varargs[AttrUpdate]): Assignment =
var updateAssignmentArgs: seq[NimNode] = @[toStrLit(dest), cond]
for attrUpdate in attrUpdates:
updateAssignmentArgs.add(attrUpdate)
result = newCall("updateAssignment", updateAssignmentArgs)
Please elaborate a bit on what you are trying to do and what might cause the crash. Also please try to boil the code down to what is causing the crash.
The reason is probably that myUpdate() passes its arguments directly to newCall(), instead of passing them as NimNodes. But this should result in an compile error rather than invalid C code being generated.
This issue has been automatically marked as stale because it has not had recent activity. If you think it is still a valid issue, write a comment below; otherwise it will be closed. Thank you for your contributions.
The following code:
causes the following error when compiling: