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
Fix#1990: Handle case where inlining changes class of outer
The new situation in the test was that outer of the inlined method
was `A` but it's as seen from type is a subtype `B`.
We need two fixes:
- Ignore outerSelects in TreeChecker. These are treated as having fixed symbols.
- Adapt the outer-path logic to deal with code that's moved to another context.
valouterAccessorCtx= ctx.withPhaseNoLater(ctx.lambdaLiftPhase) // lambdalift mangles local class names, which means we cannot reliably find outer acessors anymore
364
371
ctx.log(i"outer to $toCls of $tree: ${tree.tpe}, looking for ${outerAccName(treeCls.asClass)(outerAccessorCtx)} in $treeCls")
365
-
if (treeCls == toCls) tree
372
+
if (treeCls == toCls|| outOfContext && toCls.derivesFrom(treeCls)) tree
0 commit comments