diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-11-09 20:09:06 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-11-11 18:01:14 +0200 |
| commit | 52b8efc726097df70dca7287b0a8e16b0a8a642d (patch) | |
| tree | da6401405b424123fda197f4f847878399bb6343 /src/Sema.zig | |
| parent | 40a2dfc12a611082ba6810c566a6a46acdb864fc (diff) | |
| download | zig-52b8efc726097df70dca7287b0a8e16b0a8a642d.tar.gz zig-52b8efc726097df70dca7287b0a8e16b0a8a642d.zip | |
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.
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
