Skip to content

No mixin forwarder when ancestor is sealed #23482

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Jul 6, 2025

Fixes #23479

Adds check for Java sealed ancestor to needsMixinForwarder.

If it's ok to invokespecial an indirect superinterface, then the fix should be in the backend, to not add the interface parent.

@som-snytt som-snytt force-pushed the issue/23479-sealing branch 4 times, most recently from 8b1c2c7 to a85d7c5 Compare July 7, 2025 00:24
@som-snytt som-snytt force-pushed the issue/23479-sealing branch from a85d7c5 to 726e081 Compare July 7, 2025 16:35
@som-snytt
Copy link
Contributor Author

Not settled on the solution, but added // scalajs: --skip.

@som-snytt
Copy link
Contributor Author

Looking into a Scala 2 issue, JVM spec says

• Each invokespecial instruction must name one of the following:
– an instance initialization method (§2.9.1)
– a method in the current class or interface
– a method in a superclass of the current class
– a method in a direct superinterface of the current class or interface
– a method in Object

by which I understand direct superinterface to mean the forwarder won't work if not implementing the superinterface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime errors when implementing non-sealed java interface
1 participant