mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
parent
1e963053d0
commit
be9a4a1f97
@ -15652,7 +15652,9 @@ fn zirBoolBr(
|
||||
_ = try lhs_block.addBr(block_inst, lhs_result);
|
||||
|
||||
const rhs_result = try sema.resolveBody(rhs_block, body, inst);
|
||||
_ = try rhs_block.addBr(block_inst, rhs_result);
|
||||
if (!sema.typeOf(rhs_result).isNoReturn()) {
|
||||
_ = try rhs_block.addBr(block_inst, rhs_result);
|
||||
}
|
||||
|
||||
return finishCondBr(sema, parent_block, &child_block, &then_block, &else_block, lhs, block_inst);
|
||||
}
|
||||
|
||||
@ -103,6 +103,7 @@ test {
|
||||
_ = @import("behavior/bugs/12972.zig");
|
||||
_ = @import("behavior/bugs/12984.zig");
|
||||
_ = @import("behavior/bugs/13068.zig");
|
||||
_ = @import("behavior/bugs/13112.zig");
|
||||
_ = @import("behavior/bugs/13128.zig");
|
||||
_ = @import("behavior/byteswap.zig");
|
||||
_ = @import("behavior/byval_arg_var.zig");
|
||||
|
||||
7
test/behavior/bugs/13112.zig
Normal file
7
test/behavior/bugs/13112.zig
Normal file
@ -0,0 +1,7 @@
|
||||
fn nice(a: u32, b: u32) bool {
|
||||
return a == 5 or b == 2 or @panic("oh no");
|
||||
}
|
||||
|
||||
test {
|
||||
_ = nice(2, 2);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user