Skip to content

Commit

Permalink
LambdaLift: do not close over members that are static.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkDimius committed May 27, 2016
1 parent 4007910 commit 3b0cb48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dotty/tools/dotc/transform/LambdaLift.scala
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform
}
def captureImplicitThis(x: Type): Unit = {
x match {
case TermRef(x, _) => captureImplicitThis(x)
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)
case _ =>
}
}
Expand Down

0 comments on commit 3b0cb48

Please sign in to comment.