diff --git a/compiler/src/dotty/tools/dotc/transform/CacheAliasImplicits.scala b/compiler/src/dotty/tools/dotc/transform/CacheAliasImplicits.scala index c4cfe83ae4bb..ad2acb7f7c47 100644 --- a/compiler/src/dotty/tools/dotc/transform/CacheAliasImplicits.scala +++ b/compiler/src/dotty/tools/dotc/transform/CacheAliasImplicits.scala @@ -56,6 +56,7 @@ class CacheAliasImplicits extends MiniPhase with IdentityDenotTransformer { this if rhsTpe.isStable => false case rhsTpe @ TermRef(pre: ThisType, _) if rhsTpe.isStable && pre.cls == sym.owner.enclosingClass => false + case rhsTpe: ThisType => false case _ => true } case _ => false