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

Support JDT's implicit yield in switch statements #10100

Open
wants to merge 1 commit into
base: release/2.12
Choose a base branch
from

Conversation

niloc132
Copy link
Member

JDT generates a yield for arrow cases if the arrow points at a expression, even though the expression cannot be returned. Synthesize a block wrapping that expression as a statement, and add a break to the end of it.

Fixes #10044
See #10059

JDT generates a yield for arrow cases if the arrow points at a
expression, even though the expression cannot be returned. Synthesize a
block wrapping that expression as a statement, and add a break to the
end of it.

Fixes gwtproject#10044
@niloc132 niloc132 added this to the 2.12.2 milestone Feb 26, 2025
@@ -121,6 +121,9 @@ public void testSwitchExprInlining() {
public void testInlinedStringConstantsInCase() {
assertFalse(isGwtSourceLevel17());
}
public void testCaseArrowLabelsVoidExpression() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also missing in main (this is a backport for 2.12.2), so I'm somewhat unconcerned.

Related-ish, I will put up a PR soon that might get our checkstyle annotations back, again, in PRs...

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

Successfully merging this pull request may close these issues.

3 participants