-
Notifications
You must be signed in to change notification settings - Fork 716
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
Clarify switch expression usage #4887
Conversation
Visit the preview URL for this PR (updated for commit b4b6352): https://dart-dev--pr4887-switch-exp-oiqmu4af.web.app (expires Tue, 23 May 2023 20:14:28 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: d851bc446d3c4d7394c5406c6f07255afc7075f3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM: One nit you can take or leave.
Co-authored-by: Anthony Sansone <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this. I love these adjustments. It's definitely a lot more clear!
A few minor fixes:
Co-authored-by: Parker Lougheed <[email protected]>
Fixes dart-lang#4865 --------- Co-authored-by: Anthony Sansone <[email protected]> Co-authored-by: Parker Lougheed <[email protected]>
I don't think "return a value into some expression statement" in lines 136 and 137 exactly makes sense:
I could also just say "if you need to start an expression statement with a switch, use a switch statement" if that's clearer. This seems to be where the confusion is.
Fixes #4865
Didn't change the bullet list, just moved it below the example since it's kind of weird to list out the syntax differences without having shown an example yet.