Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
hamzaremmal merged 1 commit into scala:main from som-snytt:issue/23479-sealing
Oct 1, 2025

Conversation

Copy link
Contributor

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

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.

Gedochao reacted with thumbs up emoji
@som-snytt som-snytt force-pushed the issue/23479-sealing branch 5 times, most recently from a85d7c5 to 726e081 Compare July 7, 2025 16:35
Copy link
Contributor Author

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

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.

Copy link
Contributor Author

Flaky:

[error] Could not create file /__w/scala3/scala3/community-build/community-projects/Equal/jvm/target/streams/_global/ivySbt/_global/streams/outjava.io.IOException: No such file or directory

Copy link

@hamzaremmal Do you have an ETA for when you will have time to review this?

Copy link
Member

@hamzaremmal Do you have an ETA for when you will have time to review this?

I'm quite busy with some urgent work. I'll probably review it after Scala Days 2025. Regardless, it will be included in 3.8.0.

Copy link
Member

@som-snytt can you please rebase on top of the latest commit in main.

som-snytt reacted with thumbs up emoji

@hamzaremmal hamzaremmal merged commit e914efe into scala:main Oct 1, 2025
49 checks passed
@som-snytt som-snytt deleted the issue/23479-sealing branch October 1, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@hamzaremmal hamzaremmal hamzaremmal approved these changes

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Runtime errors when implementing non-sealed java interface

AltStyle によって変換されたページ (->オリジナル) /