Skip to content

Fix #2390: Use normal thisType as base for override checking #2580

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
May 29, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 29, 2017

Using upwardsThisType can cause MissingType errors. It's a hairy
problem which is still not quite understood (see comment on
upwardsThisType). We currently address this by trying either
normal thisType or upwardsThisType.

Using upwardsThisType can cause MissingType errors. It's a hairy
problem which is still not quite understood (see comment on
upwardsThisType). We currently address this by trying either
normal thisType or upwardsThisType.
@odersky odersky requested a review from smarter May 29, 2017 15:31
(memberTp frozen_<:< otherTp) || {
val jointBounds = (memberTp.bounds & otherTp.bounds).bounds
jointBounds.lo frozen_<:< jointBounds.hi
def compatibleTypes(memberTp: Type, otherTp: Type): Boolean =
Copy link
Member

Choose a reason for hiding this comment

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

I suggest using other names than memberTp and otherTp here, because memberTp and otherTp are already in scope at this point and they could easily be confused when reading the code.

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM, maybe open an issue to come back to this?

@odersky odersky merged commit 3f222ca into scala:master May 29, 2017
@allanrenucci allanrenucci deleted the fix-#2390 branch December 14, 2017 19:18
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.

2 participants