Uh oh!
There was an error while loading. Please reload this page.
Properly reset error return trace index - #12825
Conversation
Vexu
commented
Sep 12, 2022
Hmm, this still doesn't handle this case properly: conststd=@import("std");
test {
returnerror.SkipZigTest;
}
fnfoo() !void {
returnerror.DontShow;
}
test {
foo() catch {
foo() catch {};
std.debug.dumpStackTrace(@errorReturnTrace().?.*);
};
}Maybe it'd be better to start off with a simplified version which always resets to zero since it handles all the common cases properly. |
019feed to
fa5d844Comparetopolarity
commented
Sep 12, 2022
Not sure if this is good news or bad, but I'm just finishing up an overlapping change that should handle that case correctly. It intends to implement the rest of #1923 (comment) (esp. supporting Let me know how we can best coordinate the follow-up change so that I don't step on your toes here 🙂 |
Vexu
commented
Sep 12, 2022
If you have a more complete fix then let's go with that, I just want this annoyance fixed to get the full benefit of #12807 |
Vexu
commented
Sep 28, 2022
Closing in favor of the more complete solution. |
Currently depends on #12807 to free up two Zir instruction slots, only the last commit is relevant to this PR.
Example:
With the comment:
Uncommented:
Closes#1923