authorgravatar for justus@klausecker.deJustus Klausecker <justus@klausecker.de> 2025-08-07 13:56:44+02:00
committergravatar for justus@klausecker.deJustus Klausecker <justus@klausecker.de> 2025-08-07 13:58:49+02:00
log0ecbd5a0e113c0c771ef285cedd0880e695296e6
tree1c624e49e996f43dbdc0c3566add30106a46b3d5
parentba549a7d67d0268cdbd4b23a5b7371de4f2d8d33

address comments


4 files changed, 1 insertions(+), 9 deletions(-)

test/behavior/switch.zig+1-3
......@@ -1117,8 +1117,6 @@ test "switch on non-exhaustive enum" {
11171117 }
11181118 };
11191119
1120 var e: E = .a;
1121 _ = &e;
1122 try E.doTheTest(e);
1120 try E.doTheTest(.a);
11231121 try comptime E.doTheTest(.a);
11241122}
test/cases/compile_errors/switch_expression-non_exhaustive_absorbing.zig-2
......@@ -22,8 +22,6 @@ pub export fn entry2() void {
2222}
2323
2424// error
25// backend=stage2
26// target=native
2725//
2826// :12:5: error: switch must handle all possibilities
2927// :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 {
2020}
2121
2222// error
23// backend=stage2
24// target=native
2523//
2624// :10:16: error: cannot inline '_' prong
2725// :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 {
1212}
1313
1414// error
15// backend=stage2
16// target=native
1715//
1816// :10:14: error: unreachable else prong; all explicit cases already handled