@@ -2140,14 +2140,14 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
21402140 private def typeparamCorrespondsToField (tycon : Type , tparam : TypeParamInfo ): Boolean =
21412141 productSelectorTypes(tycon, null ).exists {
21422142 case tp : TypeRef =>
2143- ( tp.designator: Any ) == tparam // Bingo!
2143+ tp.designator.eq( tparam) // Bingo!
21442144 case _ =>
21452145 false
21462146 }
21472147
21482148 /** Is `tp` an empty type?
21492149 *
2150- * `true` implies that we found a proof; uncertainty default to `false`.
2150+ * `true` implies that we found a proof; uncertainty defaults to `false`.
21512151 */
21522152 def provablyEmpty (tp : Type ): Boolean =
21532153 tp.dealias match {
@@ -2156,9 +2156,9 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
21562156 case OrType (tp1, tp2) => provablyEmpty(tp1) && provablyEmpty(tp2)
21572157 case at @ AppliedType (tycon, args) =>
21582158 args.lazyZip(tycon.typeParams).exists { (arg, tparam) =>
2159- tparam.paramVariance >= 0 &&
2160- provablyEmpty(arg) &&
2161- typeparamCorrespondsToField(tycon, tparam)
2159+ tparam.paramVariance >= 0
2160+ && provablyEmpty(arg)
2161+ && typeparamCorrespondsToField(tycon, tparam)
21622162 }
21632163 case tp : TypeProxy =>
21642164 provablyEmpty(tp.underlying)
@@ -2168,7 +2168,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
21682168
21692169 /** Are `tp1` and `tp2` provablyDisjoint types?
21702170 *
2171- * `true` implies that we found a proof; uncertainty default to `false`.
2171+ * `true` implies that we found a proof; uncertainty defaults to `false`.
21722172 *
21732173 * Proofs rely on the following properties of Scala types:
21742174 *
@@ -2178,7 +2178,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
21782178 * 4. There is no value of type Nothing
21792179 *
21802180 * Note on soundness: the correctness of match types relies on on the
2181- * property that in all possible contexts, a same match type expression
2181+ * property that in all possible contexts, the same match type expression
21822182 * is either stuck or reduces to the same case.
21832183 */
21842184 def provablyDisjoint (tp1 : Type , tp2 : Type )(implicit ctx : Context ): Boolean = {
@@ -2221,8 +2221,8 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
22212221 else
22222222 false
22232223 case (AppliedType (tycon1, args1), AppliedType (tycon2, args2)) if tycon1 == tycon2 =>
2224- // It is possible to conclude that two types applies are disjoints by
2225- // looking at covariant type parameters if The said type parameters
2224+ // It is possible to conclude that two types applies are disjoint by
2225+ // looking at covariant type parameters if the said type parameters
22262226 // are disjoin and correspond to fields.
22272227 // (Type parameter disjointness is not enough by itself as it could
22282228 // lead to incorrect conclusions for phantom type parameters).
0 commit comments