From db295e8fb13c8490b96d84e8357a75550ebdebfd Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 18 Feb 2017 17:40:59 +0100 Subject: Fix default parameter value. Interesting that the tests pass even if we always assume outOfContext = true. So this raises the question why have a flag? It's just that I am not sure the `outOfContext` behavior is correct in all cases. So I prefer to be conservative here. --- compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala') diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala index cb74f601f..3cfbdf454 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -364,7 +364,7 @@ object ExplicitOuter { */ def path(toCls: Symbol, start: Tree = This(ctx.owner.lexicallyEnclosingClass.asClass), - outOfContext: Boolean = true): Tree = try { + outOfContext: Boolean = false): 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 -- cgit v1.2.3