You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ignore new unreachable_switch_default warning. (#2318)
The Dart analyzer will soon be changed so that if the `default` clause
of a `switch` statement is determined to be unreachable by the
exhaustiveness checker, a new warning of type
`unreachable_switch_default` will be issued. This parallels the
behavior of the existing `unreachable_switch_case` warning, which is
issued whenever a `case` clause of a `switch` statement is determined
to be unreachable.
In the vast majority of cases, the most reasonable way to address the
warning is to remove the unreachable `default` clause. However, in a
few rare cases, the `default` clause must be kept, due to the fact
that flow analysis is not as sophisticated as exhaustiveness checking
(see dart-lang/language#2977 for details).
Two of these rare cases crop up in dart-sass. This change adds
`ignore` comments to avoid a spurious warning, and adds a comment
explaining why the `default` clause needs to be kept.
0 commit comments