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

Feedback on page "Switch Expressions (JEP 361)" #60

Closed
veselin-vasilev opened this issue Sep 12, 2021 · 1 comment
Closed

Feedback on page "Switch Expressions (JEP 361)" #60

veselin-vasilev opened this issue Sep 12, 2021 · 1 comment
Assignees

Comments

@veselin-vasilev
Copy link
Contributor

Hello, I would like to propose the following improvement on this page:

All of the suggestions go under the "The Four Forms of Switch":

  1. The second bullet point is cut short after "unless'. I assume it was supposed to finish with "explicitly terminated with a 'break'."
  2. The first example in this section is for a switch statement without fall through. However, it showcases a switch expression. I think this was likely a copy-paste issue, as this example has the same code as the example preceding it in the previous section ("Statements in Branches").
  3. The second example in this section is for a fall through version of switch expressions, but it includes a yield in every case, thus not actually demonstrating the fall through.
@veselin-vasilev
Copy link
Contributor Author

Since these are fairly trivial to fix, I've raised a PR for it. GitHub doesn't seem to have automatically linked the PR, so here it is -> #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants