File tree 1 file changed +6
-4
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1499,7 +1499,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1499
1499
false
1500
1500
}
1501
1501
1502
- def isSubArg (arg1 : Type , arg2 : Type ): Boolean = arg2 match {
1502
+ def isSubArg (arg1 : Type , arg2 : Type ): Boolean = arg2 match
1503
1503
case arg2 : TypeBounds =>
1504
1504
val arg1norm = arg1 match {
1505
1505
case arg1 : TypeBounds =>
@@ -1517,14 +1517,16 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1517
1517
// embedded `=> T` arguments alone. This clause needs to compensate for that.
1518
1518
isSubArg(arg1.argInfos.head, arg2res)
1519
1519
case _ =>
1520
- arg1 match {
1520
+ arg1 match
1521
1521
case arg1 : TypeBounds =>
1522
1522
compareCaptured(arg1, arg2)
1523
+ case ExprType (arg1res)
1524
+ if ctx.phaseId > elimByNamePhase.id && ! ctx.erasedTypes
1525
+ && defn.isByNameFunction(arg2) =>
1526
+ isSubArg(arg1res, arg2.argInfos.head)
1523
1527
case _ =>
1524
1528
(v > 0 || isSubType(arg2, arg1)) &&
1525
1529
(v < 0 || isSubType(arg1, arg2))
1526
- }
1527
- }
1528
1530
1529
1531
isSubArg(args1.head, args2.head)
1530
1532
} && recurArgs(args1.tail, args2.tail, tparams2.tail)
You can’t perform that action at this time.
0 commit comments