File tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/core 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -606,10 +606,10 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
606
606
return recur(tp1.EtaExpand (tparams1), tp2) || fourthTry
607
607
tp2 match {
608
608
case EtaExpansion (tycon2) if tycon2.symbol.isClass && tycon2.symbol.is(JavaDefined ) =>
609
- return recur(tp1, tycon2)
609
+ recur(tp1, tycon2) || fourthTry
610
610
case _ =>
611
+ fourthTry
611
612
}
612
- fourthTry
613
613
}
614
614
compareTypeLambda
615
615
case OrType (tp21, tp22) =>
@@ -774,6 +774,8 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
774
774
case tp1 : HKTypeLambda =>
775
775
def compareHKLambda = tp1 match {
776
776
case EtaExpansion (tycon1) if tycon1.symbol.isClass && tycon1.symbol.is(JavaDefined ) =>
777
+ // It's a raw type that was mistakenly eta-expanded to a hk-type.
778
+ // This can happen because we do not cook types coming from Java sources
777
779
recur(tycon1, tp2)
778
780
case _ => tp2 match {
779
781
case tp2 : HKTypeLambda => false // this case was covered in thirdTry
You can’t perform that action at this time.
0 commit comments