-
Notifications
You must be signed in to change notification settings - Fork 2
Fix IncompatibleClassChangeError under Java 9 #24
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
Fix IncompatibleClassChangeError under Java 9 #24
Conversation
This commit temporarily changes .gitmodules until lampepfl/scala#24 is merged.
|
Corresponding Dotty PR: scala/scala3#3138 |
This commit temporarily changes .gitmodules until lampepfl/scala#24 is merged.
|
Scalac 2.12.3 emits an See: |
|
Thanks! I guess this answers my question: https://github.com/scala/scala/blob/32f597704698291b7162335844b366a20873c67b/src/compiler/scala/tools/nsc/backend/jvm/BTypesFromSymbols.scala#L76-L79, you're calling |
This commit temporarily changes .gitmodules until lampepfl/scala#24 is merged.
This commit temporarily changes .gitmodules until lampepfl/scala#24 is merged.
48e0589 to
6152e24
Compare
This commit temporarily changes .gitmodules until lampepfl/scala#24 is merged.
The itf flag of `visitMethodInsn` and `Handle` in ASM needs to be true when the method is defined in an interface. Java 8 ignores this but Java 9 fails at runtime with: java.lang.IncompatibleClassChangeError: Method ... must beInterfaceMethodref constant This commit is inspired by similar changes in scalac, in particular see 7d51b3f by Jason Zaugg (from scala#5251) and e619b03 by Lukas Rytz (from scala#5293). This issue was also discussed in scala#5452 (which does not matter for Dotty since we do not run the backend optimizer).
This commit temporarily changes .gitmodules until lampepfl/scala#24 is merged.
The itf flag of
visitMethodInsnandHandlein ASM needs to be truewhen the method is defined in an interface. Java 8 ignores this but Java
9 fails at runtime with:
java.lang.IncompatibleClassChangeError: Method ... must be InterfaceMethodref constant
This commit is inspired by similar changes in scalac, in particular see
7d51b3f by Jason Zaugg
(from scala#5251) and
e619b03 by Lukas Rytz
(from scala#5293). This issue was also
discussed in scala#5452 (which does not
matter for Dotty since we do not run the backend optimizer).