Skip to content

Commit 0ecbd5a

Browse files
committed
address comments
1 parent ba549a7 commit 0ecbd5a

File tree

4 files changed

+1
-9
lines changed

4 files changed

+1
-9
lines changed

test/behavior/switch.zig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)