-
Notifications
You must be signed in to change notification settings - Fork 130
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
VerifyError in switch expression on double #2382
Comments
I can reproduce on latest master, where I also see a new warning attached to main method: |
I'll follow up. |
This code is not supposed to compile in the first place. 14.11 states:
JDK21 rejects with (I renamed the class to be X.java)
which is weird. JDK22 rejects it with:
which is bang on. |
On master, we reject the code correctly for language levels <=20. The verify error is encountered for levels JDK21 and JDK22 (only) |
@srikanth-sankaran What exactly is fixed here? I still see javac and ecj disagreeing, whereas above you said that javac is right. So? I started to prepare SwitchExpressionYieldTest for run.javac mode, but currently that's more than I can chew. |
This code compiles, but fails at runtime:
The error is:
The JDT versions according to my eclipse installation details are:
3.37.0.v20240215-1452 org.eclipse.jdt.core
and3.19.400.v20240229-0520 org.eclipse.jdt
I do not know if the bug is that it compiles at all, or that it fails at runtime...
The text was updated successfully, but these errors were encountered: