Commit 52b8efc726

Veikka Tuominen <git@vexu.eu>
2022-11-09 19:09:06
Sema: check for error unwrap in `condbr_inline`
The part of `condbr` that is supposed to be the same as `condbr_inline` already does this.
1 parent 40a2dfc
Changed files (1)
src/Sema.zig
@@ -1491,6 +1491,8 @@ fn analyzeBodyInner(
                     return err;
                 };
                 const inline_body = if (cond.val.toBool()) then_body else else_body;
+
+                try sema.maybeErrorUnwrapCondbr(block, inline_body, extra.data.condition, cond_src);
                 const old_runtime_index = block.runtime_index;
                 defer block.runtime_index = old_runtime_index;
                 const break_data = (try sema.analyzeBodyBreak(block, inline_body)) orelse