Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Jan 3, 2017

When computing the outer path, we need to be careful to dealias before erasure,
even if the outer path is demanded during erasure. Otherwise we lose prefixes.

Review by @DarkDimius ?

When computing the outer path, we need to be careful to dealias before erasure,
even if the outer path is demanded during erasure. Otherwise we lose prefixes.
else tpe.prefix
case _ =>
outerPrefix(tpe.underlying)
outerPrefix(tpe.underlying(ctx.withPhaseNoLater(ctx.erasurePhase)))
Copy link
Member

Choose a reason for hiding this comment

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

Since this is somewhat subtle, I would add a comment here that restates what is in the commit message.

val cls = fun.symbol.owner.asClass
def outerArg(receiver: Tree): Tree = receiver match {
case New(_) | Super(_, _) =>
println(i"outerarg: ${receiver.tpe} --> ${outerPrefix(receiver.tpe)} at ${ctx.phase}")
Copy link
Member

Choose a reason for hiding this comment

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

stray println

@@ -0,0 +1,24 @@
class AbsCell {
Copy link
Member

Choose a reason for hiding this comment

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

This test is in tests/pending/ so we're not actually running it

@odersky odersky merged commit 42eb864 into scala:master Jan 5, 2017
@allanrenucci allanrenucci deleted the fix-#1865 branch December 14, 2017 16:59
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