@@ -220,7 +220,7 @@ object Summarization {
220
220
}
221
221
222
222
case ThisType (tref) =>
223
- val enclosing = env.ctx.owner.enclosingClass .asClass
223
+ val enclosing = env.ctx.owner.lexicallyEnclosingClass .asClass
224
224
val cls = tref.symbol.asClass
225
225
resolveThis(cls, ThisRef ()(source), enclosing, source)
226
226
@@ -252,13 +252,15 @@ object Summarization {
252
252
}
253
253
254
254
def resolveThis (cls : ClassSymbol , pot : Potential , cur : ClassSymbol , source : Tree )(implicit env : Env ): Summary =
255
+ trace(" resolve " + cls.show + " , pot = " + pot.show + " , cur = " + cur.show, init, s => Summary .show(s.asInstanceOf [Summary ])) {
255
256
if (cls.is(Flags .Package )) (Potentials .empty, Effects .empty)
256
257
else if (cls == cur) (pot.toPots, Effects .empty)
257
258
else if (pot.size > 2 ) (Potentials .empty, Promote (pot)(source).toEffs)
258
259
else {
259
260
val pot2 = Outer (pot, cur)(pot.source)
260
- resolveThis(cls, pot2, cur.enclosingClass .asClass, source)
261
+ resolveThis(cls, pot2, cur.lexicallyEnclosingClass .asClass, source)
261
262
}
263
+ }
262
264
263
265
/** Summarize secondary constructors or class body */
264
266
def analyzeConstructor (ctor : Symbol )(implicit env : Env ): Summary =
0 commit comments