You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
valouterAccessorCtx= ctx.withPhaseNoLater(ctx.lambdaLiftPhase) // lambdalift mangles local class names, which means we cannot reliably find outer acessors anymore
393
-
ctx.log(i"outer to $toCls of $tree: ${tree.tpe}, looking for ${outerAccName(treeCls.asClass)(outerAccessorCtx)} in $treeCls")
i"failure to construct path from ${ctx.owner.ownersIterator.toList}%/% to `this` of ${toCls.showLocated};\n${treeCls.showLocated} does not have an outer accessor")
399
-
loop(tree.select(acc).ensureApplied, count -1)
400
-
}
401
-
}
402
-
ctx.log(i"computing outerpath to $toCls from ${ctx.outersIterator.map(_.owner).toList}")
403
-
loop(start, count)
404
-
}
405
-
catch {
406
-
caseex: ClassCastException=>
389
+
count: Int=-1):Tree=
390
+
try
391
+
@tailrec defloop(tree: Tree, count: Int):Tree=
392
+
valtreeCls= tree.tpe.widen.classSymbol
393
+
valouterAccessorCtx= ctx.withPhaseNoLater(ctx.lambdaLiftPhase) // lambdalift mangles local class names, which means we cannot reliably find outer acessors anymore
394
+
ctx.log(i"outer to $toCls of $tree: ${tree.tpe}, looking for ${outerAccName(treeCls.asClass)(outerAccessorCtx)} in $treeCls")
395
+
if (count ==0|| count <0&& treeCls == toCls) tree
396
+
else
397
+
defselectWith(acc: Symbol):Tree=
398
+
assert(acc.exists,
399
+
i"failure to construct path from ${ctx.owner.ownersIterator.toList}%/% to `this` of ${toCls.showLocated};\n${treeCls.showLocated} does not have an outer accessor")
0 commit comments