Skip to content

Fix #9967: Don't add forwarders for super accessors #9978

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
merged 1 commit into from
Oct 11, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 10, 2020

Super accessors are flagged as Artifact in dotty, but not in nsc. So
We need to weed them out separately when creating export forwarders.

Super accessors are flagged as Artifact in dotty, but not in nsc. So
We need to weed them out separately when creating export forwarders.
&& mbr.matchesImportBound(if mbr.symbol.is(Given) then givenBound else wildcardBound)
then addForwarder(alias, mbr, span)
if !mbr.symbol.isSuperAccessor then
// Scala 2 superaccessors have neither Synthetic nor Artfact set, so we
Copy link
Member

Choose a reason for hiding this comment

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

Alternatively I guess we could set these flags for superaccessors in Scala2Unpickler, that way we're sure they're treated like the dotty ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd consider that if we find other areas where the missing flag for super accessors messes things up. As it is now, we exercise the test a lot less often than if we have to test every symbol read from Scala 2 for whether it is a super accessor.

@smarter smarter merged commit 35c05ca into scala:master Oct 11, 2020
@smarter smarter deleted the fix-#9967 branch October 11, 2020 16:08
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
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.

3 participants