aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-07-26 14:08:37 +0300
committerVeikka Tuominen <git@vexu.eu>2022-07-26 16:40:24 +0300
commit7862ab9f410d20d0cfe799bf025f8cf57dd6f15a (patch)
tree34788787a7527db958e7124480add79524a9940e /src
parent5d99e5ecd493b6cec54cf870d77d61b2a8480131 (diff)
downloadzig-7862ab9f410d20d0cfe799bf025f8cf57dd6f15a.tar.gz
zig-7862ab9f410d20d0cfe799bf025f8cf57dd6f15a.zip
Sema: disable "unreachable else prong" error for error sets for now
Closes #11798
Diffstat (limited to 'src')
-rw-r--r--src/Sema.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 5189ad818c..72278f550c 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -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,