From 52b8efc726097df70dca7287b0a8e16b0a8a642d Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Wed, 9 Nov 2022 20:09:06 +0200 Subject: [PATCH] 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. --- src/Sema.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Sema.zig b/src/Sema.zig index 51b1592c26..c393dab598 100644 --- a/src/Sema.zig +++ b/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