-
Notifications
You must be signed in to change notification settings - Fork 139
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
Boolean switch inconsistency between ECJ and javac #3559
Comments
@stephan-herrmann - do you want to look at these issues with Bollean switches? If not please assign to me. Thanks. |
Behavior change happened at 4.34 M1. Upto 4.33 we reject the code with: Description Resource Path Location Type |
Confirmed that this is a regression brought on by BETA_JAVA23 branch being merged onto master via commit f8fb582 |
JDK23 compiles the code (without any preview flags) - that looks certainly suspect! And I don't think the problem is particular to booleans. For example, the following was rejected by JDK22, but accepted by JDK23 (without any preview flags):
@stephan-herrmann - do you agree that JDK23 behavior is incorrect ? |
In Java 22, this compiles and runs in ECJ, but javac reports
However, adding a guard pattern makes it not compile anymore in ECJ:
Perhaps related to #3558.
The text was updated successfully, but these errors were encountered: