Skip to content

Commit 76f235b

Browse files
oderskyWojciechMazur
authored andcommitted
Rename isHard --> isIncomplete
[Cherry-picked e07d50e]
1 parent e5bef4b commit 76f235b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,13 +1623,13 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
16231623
val tparam = tparams2.head
16241624
val v = tparam.paramVarianceSign
16251625

1626-
/** An argument test is hard if it implies a comparison A <: B where
1626+
/** An argument test is incomplete if it implies a comparison A <: B where
16271627
* A is an AndType or B is an OrType. In these cases we need to run an
16281628
* either, which can lose solutions if there are type variables involved.
16291629
* So we defer such tests to run last, on the chance that some other argument
16301630
* comparison will instantiate or constrain type variables first.
16311631
*/
1632-
def isHard(arg1: Type, arg2: Type): Boolean =
1632+
def isIncomplete(arg1: Type, arg2: Type): Boolean =
16331633
val arg1d = arg1.stripped
16341634
val arg2d = arg2.stripped
16351635
(v >= 0) && (arg1d.isInstanceOf[AndType] || arg2d.isInstanceOf[OrType])
@@ -1727,7 +1727,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
17271727
if !canDefer
17281728
|| rest1.isEmpty && deferred1.isEmpty
17291729
// skip the hardness test if this is the last argument and no previous arguments were hard
1730-
|| !isHard(arg1, arg2)
1730+
|| !isIncomplete(arg1, arg2)
17311731
then
17321732
isSubArg(arg1, arg2)
17331733
&& recurArgs(

0 commit comments

Comments
 (0)