mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
Sema: disable "unreachable else prong" error for error sets for now
Closes #11798
This commit is contained in:
parent
5d99e5ecd4
commit
7862ab9f41
@ -8916,6 +8916,10 @@ fn zirSwitchBlock(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError
|
||||
|
||||
if (special_prong == .@"else" and seen_errors.count() == operand_ty.errorSetNames().len) {
|
||||
|
||||
// TODO re-enable if defer implementation is improved
|
||||
// https://github.com/ziglang/zig/issues/11798
|
||||
if (true) break :else_validation;
|
||||
|
||||
// In order to enable common patterns for generic code allow simple else bodies
|
||||
// else => unreachable,
|
||||
// else => return,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user