File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 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
606606 return recur(tp1.EtaExpand (tparams1), tp2) || fourthTry
607607 tp2 match {
608608 case EtaExpansion (tycon2) if tycon2.symbol.isClass && tycon2.symbol.is(JavaDefined ) =>
609- return recur(tp1, tycon2)
609+ recur(tp1, tycon2) || fourthTry
610610 case _ =>
611+ fourthTry
611612 }
612- fourthTry
613613 }
614614 compareTypeLambda
615615 case OrType (tp21, tp22) =>
@@ -774,6 +774,8 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
774774 case tp1 : HKTypeLambda =>
775775 def compareHKLambda = tp1 match {
776776 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
777779 recur(tycon1, tp2)
778780 case _ => tp2 match {
779781 case tp2 : HKTypeLambda => false // this case was covered in thirdTry
You can’t perform that action at this time.
0 commit comments