Skip to content

Fix #518 - compute denotations #534

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
May 5, 2015
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 4, 2015

Take overriding into account when cpmputing denotations. Fixes #518. Review by @smarter @DarkDimius

odersky added 4 commits May 4, 2015 21:10
If previous denotation was a sym denotation, it might be overridden
by a different symbol in a new phase or run. So it is not correct to
simply return the current version of the symbol, as was done before.

We now recompute the member if there is a chance that the symbol could
be overridden.
Phase ExtensionMethods creates new symbols for extension methods
and then installs these symbols into the companion object of a value class.
It's important that the creation of these symbols is done in the phase
ExtensionMethods itself, and not in the next phase, as was done before.
If we do it in the next phase, we need the owner at the next phase
and with the new scheme of computeDenot that owner might be forced,
leading to an infinite cycle.
Allow to rebind a NmedType to refer to a symbol in a subclass
of where the previous symbol was defined. This generalizes the
previous rule that we allow to rebind from a root method to
its synthetic implementation.

The change is not necessary to make the new scheme of computeDenot pass
the tests, but it seems useful to avoid spurious errors elsehere.
@DarkDimius
Copy link
Contributor

LGTM

isWeakRef was confusing because this has nothing to do with
weak pointers.
odersky added a commit that referenced this pull request May 5, 2015
@odersky odersky merged commit 7129cbe into scala:master May 5, 2015
@DarkDimius
Copy link
Contributor

The build hangs on travis after this PR was merged.
https://s3.amazonaws.com/archive.travis-ci.org/jobs/61276739/log.txt

@allanrenucci allanrenucci deleted the fix/computeDenot branch December 14, 2017 19:22
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.

Symbols' owner are not always up to date
2 participants