| author | |
| committer | |
| log | cd992b89d2252fade1e56b5e4e7537b171af890e |
| tree | fe22efaf2003a0bf5b34b872e621d45276b5b29d |
| parent | a665872e881920e8020a513340d2427b88a55bd6 |
2 files changed, 15 insertions(+), 1 deletions(-)
src/ir.cpp+1-1| ... | ... | @@ -12423,6 +12423,7 @@ bool ir_has_side_effects(IrInstruction *instruction) { |
| 12423 | 12423 | case IrInstructionIdCheckSwitchProngs: |
| 12424 | 12424 | case IrInstructionIdSetGlobalAlign: |
| 12425 | 12425 | case IrInstructionIdSetGlobalSection: |
| 12426 | case IrInstructionIdUnwrapErrPayload: | |
| 12426 | 12427 | return true; |
| 12427 | 12428 | case IrInstructionIdPhi: |
| 12428 | 12429 | case IrInstructionIdUnOp: |
| ... | ... | @@ -12471,7 +12472,6 @@ bool ir_has_side_effects(IrInstruction *instruction) { |
| 12471 | 12472 | case IrInstructionIdFrameAddress: |
| 12472 | 12473 | case IrInstructionIdTestErr: |
| 12473 | 12474 | case IrInstructionIdUnwrapErrCode: |
| 12474 | case IrInstructionIdUnwrapErrPayload: | |
| 12475 | 12475 | case IrInstructionIdMaybeWrap: |
| 12476 | 12476 | case IrInstructionIdErrWrapCode: |
| 12477 | 12477 | case IrInstructionIdErrWrapPayload: |
test/run_tests.cpp+14| ... | ... | @@ -1896,6 +1896,20 @@ fn unsigned_cast(x: i32) -> u32 { |
| 1896 | 1896 | } |
| 1897 | 1897 | )SOURCE"); |
| 1898 | 1898 | |
| 1899 | add_debug_safety_case("unwrap error", R"SOURCE( | |
| 1900 | pub fn panic(message: []const u8) -> unreachable { | |
| 1901 | @breakpoint(); | |
| 1902 | while (true) {} | |
| 1903 | } | |
| 1904 | error Whatever; | |
| 1905 | pub fn main(args: [][]u8) -> %void { | |
| 1906 | %%bar(); | |
| 1907 | } | |
| 1908 | fn bar() -> %void { | |
| 1909 | return error.Whatever; | |
| 1910 | } | |
| 1911 | )SOURCE"); | |
| 1912 | ||
| 1899 | 1913 | } |
| 1900 | 1914 | |
| 1901 | 1915 | ////////////////////////////////////////////////////////////////////////////// |