| author | |
| committer | |
| log | ec5b7513734fc7a6f7767dd721de8f6fa088b06d |
| tree | 2f095f3af2287acf089ace7bb9cfb8ee12110264 |
| parent | 69ab687156f1099570ec2208efae8be6883073c0 |
2 files changed, 8 insertions(+), 0 deletions(-)
src/Sema.zig+1| ... | ... | @@ -11292,6 +11292,7 @@ fn zirSwitchBlockErrUnion(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Comp |
| 11292 | 11292 | .runtime_loop = block.runtime_loop, |
| 11293 | 11293 | .runtime_index = block.runtime_index, |
| 11294 | 11294 | .error_return_trace_index = block.error_return_trace_index, |
| 11295 | .want_safety = block.want_safety, | |
| 11295 | 11296 | }; |
| 11296 | 11297 | const merges = &child_block.label.?.merges; |
| 11297 | 11298 | defer child_block.instructions.deinit(gpa); |
test/cases/inherit_want_safety.zig+7| ... | ... | @@ -23,6 +23,13 @@ pub export fn entry() usize { |
| 23 | 23 | u += 1; |
| 24 | 24 | }, |
| 25 | 25 | } |
| 26 | if (@as(error{}!usize, u)) |_| { | |
| 27 | u += 1; | |
| 28 | } else |e| switch (e) { | |
| 29 | else => { | |
| 30 | u += 1; | |
| 31 | } | |
| 32 | } | |
| 26 | 33 | return u; |
| 27 | 34 | } |
| 28 | 35 |