Skip to content

Commit 9c9b0ae

Browse files
committed
Fix regression in TypeComparer
So we could not delete the two lines that never returned a result. It turns out they were necessary for their effect on the constraint. If they are removed, i3422.scala fails.
1 parent 40cab20 commit 9c9b0ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
379379
if (cls2.isClass) {
380380
if (cls2 eq AnyKindClass)
381381
return true
382+
else if (cls2.typeParams.nonEmpty && tp1.isHK)
383+
return recur(tp1, EtaExpansion(cls2.typeRef))
382384
else {
383385
val base = tp1.baseType(cls2)
384386
if (base.exists) {

0 commit comments

Comments
 (0)