diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-03-09 12:24:18 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-03-09 17:07:25 +0200 |
| commit | bb1fa0bdbd7235308362528e5c1ca408681064e9 (patch) | |
| tree | 2eaebdf0fe8e292032f6a5028df0029aa602a7c6 /src/AstGen.zig | |
| parent | 0f0d27ce2427bff9d48d14b829e29a2003ba0e9c (diff) | |
| download | zig-bb1fa0bdbd7235308362528e5c1ca408681064e9.tar.gz zig-bb1fa0bdbd7235308362528e5c1ca408681064e9.zip | |
Sema: handle noreturn result in condbr_inline
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index cb5fd161a7..bd8f06ae59 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -7646,6 +7646,7 @@ fn cImport( const block_inst = try gz.makeBlockInst(.c_import, node); const block_result = try expr(&block_scope, &block_scope.base, .none, body_node); + _ = try gz.addUnNode(.ensure_result_used, block_result, node); if (!gz.refIsNoReturn(block_result)) { _ = try block_scope.addBreak(.break_inline, block_inst, .void_value); } |
