diff options
-rw-r--r-- | compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala | 2 | ||||
-rw-r--r-- | tests/pos/i1865.scala (renamed from tests/pending/pos/i1865.scala) | 0 |
2 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala index 497b73807..c2aacf826 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -276,6 +276,7 @@ object ExplicitOuter { if (tpe.prefix eq NoPrefix) cls.owner.enclosingClass.thisType else tpe.prefix case _ => + // Need to be careful to dealias before erasure, otherwise we lose prefixes. outerPrefix(tpe.underlying(ctx.withPhaseNoLater(ctx.erasurePhase))) } case tpe: TypeProxy => @@ -339,7 +340,6 @@ object ExplicitOuter { 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}") singleton(fixThis(outerPrefix(receiver.tpe))) case This(_) => ref(outerParamAccessor(cls)) // will be rewired to outer argument of secondary constructor in phase Constructors diff --git a/tests/pending/pos/i1865.scala b/tests/pos/i1865.scala index 1b77558ff..1b77558ff 100644 --- a/tests/pending/pos/i1865.scala +++ b/tests/pos/i1865.scala |