-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Kotlin code fails to compile due to java.lang.IncompatibleClassChangeError: MyClass and MyClass$special$$inlined$sortedByDescending$1 disagree on InnerClasses attribute
#4865
Comments
cc @pejovica |
What's curious is that it's unclear which linkage error Graal is trying to detect here with
|
When using Java the inner class is not being accessed through The way I see it there are two possible issues:
|
Yes, for it to surface with plain java
Yes. Proving the latter is something I'm failing at the moment.
That seems a possibility too. Removal of |
Thank you for the fix @pejovica ! |
Describe the issue
Since the merge of ce3d101 several Quarkus tests including kotlin code have started failing.
The issue seems to be originating from the fact that the kotlin compiler doesn't properly(?) generate the
InnerClasses
attribute for outer classes of generated inner classes. Inspecting the generated class files (withjavap -v
we see that the generated (by the kotlin compiler) inner class has itsInnerClasses
attribute set while the original outer class does not. This results ingetDeclaringClass0
to fail withjava.lang.IncompatibleClassChangeError: MyClass and MyClass$special$$inlined$sortedByDescending$1 disagree on InnerClasses attribute
during native image generation.Steps to reproduce the issue
@jerboaa successfully created standalone reproducers that do not rely on Quarkus.
Case 1
Case 2
Describe GraalVM and your environment:
More details
The trace for vetoableRepro looks like this:
The text was updated successfully, but these errors were encountered: