[CP] Fixes for enhanced enum and switch. #49191
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
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:
SimpleIdentifier
in exhaustiveness checking inswitch
statements, which were not possible before, but possible now inside the enum itself.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
The text was updated successfully, but these errors were encountered: