diff options
author | Martin Odersky <odersky@gmail.com> | 2016-12-02 08:53:04 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-12-02 08:53:11 +0100 |
commit | dbb0279a788d606892b123aa3baaa94614d676ff (patch) | |
tree | 085251d1a9c96685d73718a57942ff4fb9d45226 /compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala | |
parent | 47d208448e614125446c7f294f8231c3fb7108d6 (diff) | |
download | dotty-dbb0279a788d606892b123aa3baaa94614d676ff.tar.gz dotty-dbb0279a788d606892b123aa3baaa94614d676ff.tar.bz2 dotty-dbb0279a788d606892b123aa3baaa94614d676ff.zip |
Fix-1756: Use lexically enclosing class as start of outer path.
We confused the enclosing class (which skips the current class in super
call contexts) and the lexically enclosing class in three locations
that all had to do with the start of an outer path.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala | 2 |
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 3fec47e9f..a32e1c921 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -330,7 +330,7 @@ object ExplicitOuter { /** The path of outer accessors that references `toCls.this` starting from * the context owner's this node. */ - def path(toCls: Symbol, start: Tree = This(ctx.owner.enclosingClass.asClass)): Tree = try { + def path(toCls: Symbol, start: Tree = This(ctx.owner.lexicallyEnclosingClass.asClass)): Tree = try { def loop(tree: Tree): Tree = { val treeCls = tree.tpe.widen.classSymbol val outerAccessorCtx = ctx.withPhaseNoLater(ctx.lambdaLiftPhase) // lambdalift mangles local class names, which means we cannot reliably find outer acessors anymore |