4 files changed, 1 insertions(+), 9 deletions(-)
test
behavior
cases
compile_errors
test/behavior/switch.zig+1-3
| ... | ... | @@ -1117,8 +1117,6 @@ test "switch on non-exhaustive enum" { |
| 1117 | 1117 | } |
| 1118 | 1118 | }; |
| 1119 | 1119 | |
| 1120 | | var e: E = .a; |
| 1121 | | _ = &e; |
| 1122 | | try E.doTheTest(e); |
| 1120 | try E.doTheTest(.a); |
| 1123 | 1121 | try comptime E.doTheTest(.a); |
| 1124 | 1122 | } |
test/cases/compile_errors/switch_expression-non_exhaustive_absorbing.zig-2
| ... | ... | @@ -22,8 +22,6 @@ pub export fn entry2() void { |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | // error |
| 25 | | // backend=stage2 |
| 26 | | // target=native |
| 27 | 25 | // |
| 28 | 26 | // :12:5: error: switch must handle all possibilities |
| 29 | 27 | // :3:5: note: unhandled enumeration value: 'b' |
test/cases/compile_errors/switch_expression-non_exhaustive_inline.zig-2
| ... | ... | @@ -20,8 +20,6 @@ export fn g(e: E) void { |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | // error |
| 23 | | // backend=stage2 |
| 24 | | // target=native |
| 25 | 23 | // |
| 26 | 24 | // :10:16: error: cannot inline '_' prong |
| 27 | 25 | // :18:16: error: cannot inline '_' prong |
test/cases/compile_errors/switch_expression-non_exhaustive_unreachable_else.zig-2
| ... | ... | @@ -12,7 +12,5 @@ export fn f(e: E) void { |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | // error |
| 15 | | // backend=stage2 |
| 16 | | // target=native |
| 17 | 15 | // |
| 18 | 16 | // :10:14: error: unreachable else prong; all explicit cases already handled |