Skip to content
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

Hide problematic static forwarders #12860

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

smarter
Copy link
Member

@smarter smarter commented Jun 17, 2021

Static forwarders for bridges lead to ambiguous errors in some Java
compilers, and the trait setters aren't meant to be called by users.
Since we can't remove them without breaking binary-compatibility, we
mark them ACC_SYNTHETIC so that Java compilers will ignore them. See
also the discussion in #12767 which implements an alternate fix.

Fixes #12753.

Co-Authored-By: Lukas Rytz

Static forwarders for bridges lead to ambiguous errors in some Java
compilers, and the trait setters aren't meant to be called by users.
Since we can't remove them without breaking binary-compatibility, we
mark them ACC_SYNTHETIC so that Java compilers will ignore them. See
also the discussion in scala#12767 which implements an alternate fix.

Fixes scala#12753.

Co-Authored-By: Lukas Rytz <lukas.rytz@gmail.com>
Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thank you, this looks good!

@smarter smarter merged commit cdafcc2 into scala:master Jun 18, 2021
@smarter smarter deleted the static-forwarder-bridge branch June 18, 2021 08:42
@felixbr
Copy link

felixbr commented Jun 22, 2021

@smarter Judging from 3.0.1-RC2, this will not be in 3.0.1, correct?

If you could point me to the nightly releases, I would check if the issue I encountered in the twitter/util migration is gone now. I could only find nightly releases for Scala 2.x.

@smarter
Copy link
Member Author

smarter commented Jun 22, 2021

you can find them in https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/, for example set scalaVersion := "3.0.2-RC1-bin-20210621-4aa7f90-NIGHTLY" to get the latest one.

@felixbr
Copy link

felixbr commented Jun 22, 2021

Thank you 👍

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.

Overridden trait method cannot be called from java
4 participants