switch on error doesn't validate operand type #18592
Labels
bug
Observed behavior contradicts documented or intended behavior
frontend
Tokenization, parsing, AstGen, Sema, and Liveness.
regression
It worked in a previous version of Zig, but stopped working.
Milestone
Zig Version
0.12.0-dev.2255+50457482b
Steps to Reproduce and Observed Behavior
Run the following code with
zig run file.zig
:This produces the following crash:
Click Me
Expected Behavior
The
zirSwitchBlockErrUnion
function doesn't properly check if the operand is a Error Union.Probably caused by #18173.
The text was updated successfully, but these errors were encountered: