Skip to content

Fix #10905: Fix explicitSelf phase #10909

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
Dec 24, 2020
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 23, 2020

We need to rewire also some references that are simple identifiers.

We need to rewire also some references that are simple identifiers.
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

case _ => tree
case TermRef(thisTp: ThisType, _) =>
val cls = thisTp.cls
if needsCast(tree, cls) then castQualifier(tree, cls, This(cls))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if needsCast(tree, cls) then castQualifier(tree, cls, This(cls))
if needsCast(tree, cls) then castQualifier(tree, cls, This(cls).withSpan(tree.span))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will get the span anyway through the cpy.Select(tree) call.

@odersky odersky merged commit 2a32d6a into scala:master Dec 24, 2020
@odersky odersky deleted the fix-#10905 branch December 24, 2020 16:24
@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.

NoSuchMethodError for method of extended class with self bound
3 participants