Skip to content

Commit 9601642

Browse files
committed
Fix #10900: Avoid loop for F-bounds in checkCanEqual
1 parent d7d4a9f commit 9601642

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

compiler/src/dotty/tools/dotc/typer/Implicits.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,8 @@ trait Implicits:
929929
apply(t.widen)
930930
case t: RefinedType =>
931931
apply(t.parent)
932+
case t: LazyRef =>
933+
t
932934
case _ =>
933935
if (variance > 0) mapOver(t) else t
934936
}

tests/pos/i10900.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import scala.collection.IterableOps
2+
def foo[CC[A] <: IterableOps[A, CC, CC[A]], A](collection: CC[A]) =
3+
collection == collection

0 commit comments

Comments
 (0)