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.
This commit is contained in:
Veikka Tuominen 2022-11-09 20:09:06 +02:00
parent 40a2dfc12a
commit 52b8efc726

View File

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