diff options
| author | xdBronch <51252236+xdBronch@users.noreply.github.com> | 2023-07-28 22:28:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-28 22:28:55 -0400 |
| commit | 2826f78a61c014b7cfb9e7ce1a7efce31b24d0c9 (patch) | |
| tree | c002d065f4565e044ebc91be62a9642473c8b6ec /test/cases/compile_errors | |
| parent | bde6e075dfc202fdcfa21ec9c2d90941460b002e (diff) | |
| download | zig-2826f78a61c014b7cfb9e7ce1a7efce31b24d0c9.tar.gz zig-2826f78a61c014b7cfb9e7ce1a7efce31b24d0c9.zip | |
suggest using else when '_' is used for exhaustive enums (#16583)
Diffstat (limited to 'test/cases/compile_errors')
| -rw-r--r-- | test/cases/compile_errors/switching_with_exhaustive_enum_has___prong_.zig | 1 | ||||
| -rw-r--r-- | test/cases/compile_errors/switching_with_non-exhaustive_enums.zig | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/test/cases/compile_errors/switching_with_exhaustive_enum_has___prong_.zig b/test/cases/compile_errors/switching_with_exhaustive_enum_has___prong_.zig index e3d09bc133..32aa446f9a 100644 --- a/test/cases/compile_errors/switching_with_exhaustive_enum_has___prong_.zig +++ b/test/cases/compile_errors/switching_with_exhaustive_enum_has___prong_.zig @@ -17,3 +17,4 @@ pub export fn entry() void { // // :7:5: error: '_' prong only allowed when switching on non-exhaustive enums // :10:11: note: '_' prong here +// :7:5: note: consider using 'else' diff --git a/test/cases/compile_errors/switching_with_non-exhaustive_enums.zig b/test/cases/compile_errors/switching_with_non-exhaustive_enums.zig index 5678102fc6..a88393b99f 100644 --- a/test/cases/compile_errors/switching_with_non-exhaustive_enums.zig +++ b/test/cases/compile_errors/switching_with_non-exhaustive_enums.zig @@ -40,3 +40,4 @@ pub export fn entry3() void { // :19:5: error: switch on non-exhaustive enum must include 'else' or '_' prong // :26:5: error: '_' prong only allowed when switching on non-exhaustive enums // :29:11: note: '_' prong here +// :26:5: note: consider using 'else' |
