dart-lang / co19

A Dart language and library conformance test suite
BSD 3-Clause "New" or "Revised" License
37 stars 28 forks source link

Tests need to be modified for new unreachable_switch_default warning #2856

Closed stereotype441 closed 6 days ago

stereotype441 commented 1 week ago

https://dart-review.googlesource.com/c/sdk/+/378960 adds a new analyzer warning, unreachable_switch_default, which fires whenever the exhaustiveness checker detects that the default clause of a switch statement cannot be reached, because the case clauses that precede it fully account for all possible values of the value being switched upon.

The following co19 tests need to be modified to account for the new warning:

Probably the best thing to do is to ignore (or expect) the warning in these tests.