Sema: disable "unreachable else prong" error for error sets for now

Closes #11798
This commit is contained in:
Veikka Tuominen 2022-07-26 14:08:37 +03:00
parent 5d99e5ecd4
commit 7862ab9f41

View File

@ -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,