Skip to content

Implicit error types crash stage1 #2203

@shawnl

Description

@shawnl

If you use an implicit error in a switch

catch |err| switch (err) {
.MyError =>
}

it will crash with

zig: ../src/ir.cpp:21037: IrInstruction* ir_analyze_instruction_check_switch_prongs(IrAnalyze*, IrInstructionCheckSwitchProngs*): Assertion `start_value->value.type->id == ZigTypeIdErrorSet' failed.

Glad I finially figured out what the bug was...so I can work around it and continue hacking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions