-
Notifications
You must be signed in to change notification settings - Fork 142
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
[24] ECJ generates wrong code for primitive pattern with instanceof #3535
Comments
I will take a look |
Finally got to this. javac differed earlier -Compiling with Java 24 at EA23 version where this is different and a EA27 version onwards where this result is 3 now as per ECJ behaviour. The above patch is only a unit test case. |
mpalat
added a commit
to mpalat/eclipse.jdt.core
that referenced
this issue
Jan 23, 2025
Interim update: with a MAX, there indeed a difference - ecj is not generating exact coversions - looking into the same. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given the code,
Compiled and run, this returns 3 with ECJ but returns 2 with Javac. Inspecting the compiled output, I see this from ECJ:
19: instanceof #3 // class java/lang/Object
which I believe is wrong. With Javac, it's Integer.
BTW, Y is defined as below:
The text was updated successfully, but these errors were encountered: