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" {...@@ -1117,8 +1117,6 @@ test "switch on non-exhaustive enum" {
1117 }1117 }
1118 };1118 };
11191119
1120 var e: E = .a;1120 try E.doTheTest(.a);
1121 _ = &e;
1122 try E.doTheTest(e);
1123 try comptime E.doTheTest(.a);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,8 +22,6 @@ pub export fn entry2() void {
22}22}
2323
24// error24// error
25// backend=stage2
26// target=native
27//25//
28// :12:5: error: switch must handle all possibilities26// :12:5: error: switch must handle all possibilities
29// :3:5: note: unhandled enumeration value: 'b'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,8 +20,6 @@ export fn g(e: E) void {
20}20}
2121
22// error22// error
23// backend=stage2
24// target=native
25//23//
26// :10:16: error: cannot inline '_' prong24// :10:16: error: cannot inline '_' prong
27// :18:16: error: cannot inline '_' prong25// :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,7 +12,5 @@ export fn f(e: E) void {
12}12}
1313
14// error14// error
15// backend=stage2
16// target=native
17//15//
18// :10:14: error: unreachable else prong; all explicit cases already handled16// :10:14: error: unreachable else prong; all explicit cases already handled