-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
javac (LTS-Versions 11-21) produces incorrect binar-code when using cascading lamdas #1081
Comments
We are marking this issue as stale because it has not been updated for a while. This is just a way to keep the support issues queue manageable. |
@r-pf So sorry for missing the original report. Does the issue still exist with the latest versions of 11, 17, 21? |
We are marking this issue as stale because it has not been updated for a while. This is just a way to keep the support issues queue manageable. |
@maintainer_karianna @karianna The problem isn't solved - please reopen this issue. |
Please provide a brief summary of the bug
When compiling the source code LamdaWithVarArgsCompilerProblem.java below with javac of one of the versions 21.0.3+9, 17.0.11+9 or 11.0.23+9 (or may be any version of these LTS-Major-Versions 11 - 21) the produced clas-file brings a ClassCastException when executing via java.
When compiled with Java 8 e.g. 1.8.0_412-b08 it works well.
Did you test with the latest update version?
Please provide steps to reproduce where possible
Compile the source code below with javac of one of the JDK-Versions 21.0.3+9, 17.0.11+9 or 11.0.23+9 (or may be any version of these LTS-Major-Versions 11 - 21) :
Then execute the compiled class-file via java.
LamdaWithVarArgsCompilerProblem.java :
Expected Results
Compiled with 1.8.0_412-b08 => o.k.
Actual Results
Compiled with 21.0.3+9, 17.0.11+9 or 11.0.23+9 => not o.k.
An unexpected Object-array is passed. An Integer-array is expected.
What Java Version are you using?
21.0.3+9-LTS, 17.0.11+9 and 11.0.23+9
What is your operating system and platform?
ArchLinux, Windows 10
How did you install Java?
tar xvzf '../OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz'
tar xvzf '../OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz'
tar xvzf '../OpenJDK11U-jdk_x64_linux_hotspot_11.0.23_9.tar.gz'
Did it work before?
Replacing this line with
is a workaround for this problem.
Relevant log output
The text was updated successfully, but these errors were encountered: