We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4007910 commit 3b0cb48Copy full SHA for 3b0cb48
src/dotty/tools/dotc/transform/LambdaLift.scala
@@ -251,8 +251,8 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform
251
}
252
def captureImplicitThis(x: Type): Unit = {
253
x match {
254
- case TermRef(x, _) => captureImplicitThis(x)
255
- case x: ThisType => narrowTo(x.tref.typeSymbol.asClass)
+ case tr@TermRef(x, _) if (!tr.termSymbol.isStatic) => captureImplicitThis(x)
+ case x: ThisType if (!x.tref.typeSymbol.isStaticOwner) => narrowTo(x.tref.typeSymbol.asClass)
256
case _ =>
257
258
0 commit comments