Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete unreachable default clause. #2323

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

stereotype441
Copy link
Contributor

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. For details see
dart-lang/sdk#54575.

This PR deletes an unreachable default clause from dart-sass now, to avoid a spurious warning when the analyzer change lands.

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. For details see
dart-lang/sdk#54575.

This PR deletes an unreachable `default` clause from `dart-sass` now,
to avoid a spurious warning when the analyzer change lands.
@stereotype441
Copy link
Contributor Author

@nex3 Sorry for not bundling this with the very similar #2318. I'm working my way through a google3 LSC, and I failed to notice that these two changes both affected the same open source repo.

@nex3 nex3 merged commit 56a4237 into sass:main Aug 30, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants