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

[CP] Fixes for enhanced enum and switch. #49191

Closed
scheglov opened this issue Jun 7, 2022 · 4 comments
Closed

[CP] Fixes for enhanced enum and switch. #49191

scheglov opened this issue Jun 7, 2022 · 4 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. cherry-pick-approved Label for approved cherrypick request cherry-pick-review Issue that need cherry pick triage to approve P2 A bug or feature request we're likely to work on

Comments

@scheglov
Copy link
Contributor

scheglov commented Jun 7, 2022

Commit(s) to merge

https://dart-review.googlesource.com/c/sdk/+/247332

Target

stable

Issue Description

In implementation of enhanced enums in the analyzer two places should be fixed:

  1. Support for SimpleIdentifier in exhaustiveness checking in switch statements, which were not possible before, but possible now inside the enum itself.
  2. Another switch related hint where an approximation for accessing enum constants was used (static const), but which does not work correctly for enhanced enums because there are non-enum-constant constants possible now.

What is the fix

The CL makes small fixes in the analyzer.

Why cherry-pick

Well, this causes issues for users.

Risk

low

Issue link(s)

#49188

Extra Info

No response

@scheglov scheglov added the cherry-pick-review Issue that need cherry pick triage to approve label Jun 7, 2022
@a-siva a-siva added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Jun 7, 2022
@pq pq added the P2 A bug or feature request we're likely to work on label Jun 13, 2022
@itsjustkevin
Copy link
Contributor

@vsmenon @athomas This is a relatively small change with mostly updates to tests, this seems like a low risk cherry pick. Do you have an opinion on this?

@vsmenon
Copy link
Member

vsmenon commented Jun 17, 2022

lgtm

@itsjustkevin
Copy link
Contributor

Based on the low risk and complexity of this cherry-pick, I am going to mark it as approved.

@itsjustkevin itsjustkevin added the cherry-pick-approved Label for approved cherrypick request label Jun 17, 2022
@whesse
Copy link
Contributor

whesse commented Jun 21, 2022

This has been landed in 2.17.4. 2.17.5, with no additional changes, will be published.

@whesse whesse closed this as completed Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. cherry-pick-approved Label for approved cherrypick request cherry-pick-review Issue that need cherry pick triage to approve P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

8 participants