Skip to content

Fix #756 super accessors #767

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 5 commits into from
Aug 28, 2015

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Aug 21, 2015

Fix super accessor handling, specifically the problems detected in #756. Review by @DarkDimius, @SethTisue

Scalac seems to treat superaccessors of traits in a rather peculiar way. They are
left unexpanded so that a class implementing several traits with the same superaccessors
will get duplicate methods with the same name. It seems this is then resolved in the backend.

Here we solve the issue by expanding the names of trait super accessors immediately.
There was a transcription error from scalac which caused the scope
of a `!` to be wrong.
Avoid using unexpanded name because it can give wrong results for super accessors
of symbolic names. See scala#765. Without this commit t2183.scala crashes the compiler.
@@ -96,6 +96,7 @@ class tests extends CompilerTest {

@Test def new_all = compileFiles(newDir, twice)

@Test def neg_abstractOverride() = compileFile(negDir, "abstract-override", xerrors = 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

abstract-override.scala is absent in this PR.

@DarkDimius
Copy link
Contributor

LGTM

DarkDimius added a commit that referenced this pull request Aug 28, 2015
@DarkDimius DarkDimius merged commit fbc1609 into scala:master Aug 28, 2015
@allanrenucci allanrenucci deleted the fix-#756-super-accessors branch December 14, 2017 19:19
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