We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8eef182 commit f44de2dCopy full SHA for f44de2d
src/dotty/tools/dotc/transform/TailRec.scala
@@ -185,7 +185,7 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete
185
186
val receiverIsSame = enclosingClass.typeRef.widenDealias =:= recvWiden
187
val receiverIsSuper = (method.name eq sym) && enclosingClass.typeRef.widen <:< recvWiden
188
- val receiverIsThis = recv.tpe =:= thisType
+ val receiverIsThis = recv.tpe =:= thisType || recv.tpe.widen =:= thisType
189
190
val isRecursiveCall = (method eq sym)
191
0 commit comments