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] It is not an error to use a void typed expression in SwitchExpressionCase. #52218

Closed
scheglov opened this issue Apr 28, 2023 · 4 comments
Closed
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-merged Cherry-pick has been merged to the stable or beta branch. cherry-pick-review Issue that need cherry pick triage to approve merge-to-stable

Comments

@scheglov
Copy link
Contributor

scheglov commented Apr 28, 2023

Commit(s) to merge

d838d1a

Target

stable

Prepared changelist for beta/stable

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

Issue Description

The language team clarified that it is not an error to use a void typed expression in a switch expression case expression.

What is the fix

The change removes the reporting it for case, but keeps from the scrutinee.

Why cherry-pick

It is probably easier to fix it before 3.0 release than to change rules later.
It is one line change.

Risk

low

Issue link(s)

#52191

Extra Info

No response

@scheglov scheglov added the cherry-pick-review Issue that need cherry pick triage to approve label Apr 28, 2023
@mraleph mraleph added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label May 1, 2023
@itsjustkevin itsjustkevin added the cherry-pick-hold Hold off on this cherry-pick label May 1, 2023
@leafpetersen
Copy link
Member

This should be non-breaking to fix, so to reduce risk we will push this to the first hotfix release.

@itsjustkevin
Copy link
Contributor

@scheglov could you rebase this to stable? @leafpetersen do you still feel strongly that this cherry-pick should be accepted?

@scheglov
Copy link
Contributor Author

I was not able to find any other way to change beta branch to stable branch than to do cherry-pick in Gerrit UI.
But this changes the CL to cherry pick.
I will update my original request.

@leafpetersen
Copy link
Member

Yes, let's get this one out the door.

@itsjustkevin itsjustkevin added merge-to-stable cherry-pick-approved Label for approved cherrypick request cherry-pick-merged Cherry-pick has been merged to the stable or beta branch. and removed cherry-pick-hold Hold off on this cherry-pick labels May 15, 2023
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-merged Cherry-pick has been merged to the stable or beta branch. cherry-pick-review Issue that need cherry pick triage to approve merge-to-stable
Projects
None yet
Development

No branches or pull requests

8 participants