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

[dwds] Delete unreachable default clauses. #2484

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

stereotype441
Copy link
Member

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 unreachable default clauses from webdev/dwds now, to avoid a spurious warning when the analyzer change lands.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

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 unreachable `default` clauses from `webdev/dwds` now,
to avoid a spurious warning when the analyzer change lands.
@stereotype441
Copy link
Member Author

@biggs0125 I'm seeing a lot of checks failing due to unit test failures. I believe these are unrelated to my change. Can you confirm that it's safe to proceed with this?

Also, I have a failure from the "Release reminder" check. Does that require action on my part?

@stereotype441 stereotype441 merged commit 5f30c56 into dart-lang:main Sep 4, 2024
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants