Skip to content

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
tgodzik added a commit that referenced this pull request Aug 13, 2025
Backport "Add InferredMethodProvider for automatic method signature generation" to 3.3 LTS
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