Skip to content

Commit db295e8

Browse files
committed
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.
1 parent cf97412 commit db295e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ object ExplicitOuter {
364364
*/
365365
def path(toCls: Symbol,
366366
start: Tree = This(ctx.owner.lexicallyEnclosingClass.asClass),
367-
outOfContext: Boolean = true): Tree = try {
367+
outOfContext: Boolean = false): Tree = try {
368368
def loop(tree: Tree): Tree = {
369369
val treeCls = tree.tpe.widen.classSymbol
370370
val outerAccessorCtx = ctx.withPhaseNoLater(ctx.lambdaLiftPhase) // lambdalift mangles local class names, which means we cannot reliably find outer acessors anymore

0 commit comments

Comments
 (0)