File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,14 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
367367 case tp2 : LazyRef =>
368368 isBottom(tp1)
369369 || ! tp2.evaluating && recur(tp1, tp2.ref)
370+ case tp2 : RecType =>
371+ def compareRec = tp1.safeDealias match
372+ case tp1 : RecType =>
373+ val rthis1 = tp1.recThis
374+ recur(tp1.parent, tp2.parent.substRecThis(tp2, rthis1))
375+ case _ =>
376+ secondTry
377+ compareRec
370378 case CapturingType (_, _) =>
371379 secondTry
372380 case tp2 : AnnotatedType if ! tp2.isRefining =>
@@ -719,7 +727,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
719727 compareRefined
720728 case tp2 : RecType =>
721729 def compareRec = tp1.safeDealias match {
722- case tp1 : RecType =>
730+ case tp1 : RecType => // TODO this is now also in firstTry, needed here?
723731 val rthis1 = tp1.recThis
724732 recur(tp1.parent, tp2.parent.substRecThis(tp2, rthis1))
725733 case NoType => false
You can’t perform that action at this time.
0 commit comments