File tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1707,13 +1707,13 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1707
1707
val tparam = tparams2.head
1708
1708
val v = tparam.paramVarianceSign
1709
1709
1710
- /** An argument test is hard if it implies a comparison A <: B where
1710
+ /** An argument test is incomplete if it implies a comparison A <: B where
1711
1711
* A is an AndType or B is an OrType. In these cases we need to run an
1712
1712
* either, which can lose solutions if there are type variables involved.
1713
1713
* So we defer such tests to run last, on the chance that some other argument
1714
1714
* comparison will instantiate or constrain type variables first.
1715
1715
*/
1716
- def isHard (arg1 : Type , arg2 : Type ): Boolean =
1716
+ def isIncomplete (arg1 : Type , arg2 : Type ): Boolean =
1717
1717
val arg1d = arg1.stripped
1718
1718
val arg2d = arg2.stripped
1719
1719
(v >= 0 ) && (arg1d.isInstanceOf [AndType ] || arg2d.isInstanceOf [OrType ])
@@ -1811,7 +1811,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
1811
1811
if ! canDefer
1812
1812
|| rest1.isEmpty && deferred1.isEmpty
1813
1813
// skip the hardness test if this is the last argument and no previous arguments were hard
1814
- || ! isHard (arg1, arg2)
1814
+ || ! isIncomplete (arg1, arg2)
1815
1815
then
1816
1816
isSubArg(arg1, arg2)
1817
1817
&& recurArgs(
You can’t perform that action at this time.
0 commit comments