aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-01-04 17:22:47 +0700
committerMartin Odersky <odersky@gmail.com>2017-01-04 17:23:02 +0700
commita7e88df553be9dd2593dbb8581630ae815eedfb1 (patch)
tree430f555cc0cd01bacbcf36b8cc8decf2ed7f3b41 /compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
parentc40302cf0b0545cfe023fd5f8c833114398f8ff7 (diff)
downloaddotty-a7e88df553be9dd2593dbb8581630ae815eedfb1.tar.gz
dotty-a7e88df553be9dd2593dbb8581630ae815eedfb1.tar.bz2
dotty-a7e88df553be9dd2593dbb8581630ae815eedfb1.zip
Address reviewer comments
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala2
1 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