Skip to content

Commit eef623a

Browse files
Rename cmp to typeComparer
1 parent 6e39fcb commit eef623a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3772,20 +3772,20 @@ object Types {
37723772

37733773
def reduced(implicit ctx: Context): Type = {
37743774
val trackingCtx = ctx.fresh.setTypeComparerFn(new TrackingTypeComparer(_))
3775-
val cmp = trackingCtx.typeComparer.asInstanceOf[TrackingTypeComparer]
3775+
val typeComparer = trackingCtx.typeComparer.asInstanceOf[TrackingTypeComparer]
37763776

37773777
def reduceSequential(cases: List[Type])(implicit ctx: Context): Type = cases match {
37783778
case Nil => NoType
37793779
case cas :: cases1 =>
3780-
val r = cmp.matchCase(scrutinee, cas, instantiate = true)
3780+
val r = typeComparer.matchCase(scrutinee, cas, instantiate = true)
37813781
if (r.exists) r
37823782
else if (cantPossiblyMatch(cas)) reduceSequential(cases1)
37833783
else NoType
37843784
}
37853785

37863786
def reduceParallel(implicit ctx: Context) = {
37873787
val applicableBranches = cases
3788-
.map(cmp.matchCase(scrutinee, _, instantiate = true)(trackingCtx))
3788+
.map(typeComparer.matchCase(scrutinee, _, instantiate = true)(trackingCtx))
37893789
.filter(_.exists)
37903790
applicableBranches match {
37913791
case Nil => NoType
@@ -3815,9 +3815,9 @@ object Types {
38153815

38163816
def updateReductionContext() = {
38173817
reductionContext = new mutable.HashMap
3818-
for (tp <- cmp.footprint)
3818+
for (tp <- typeComparer.footprint)
38193819
reductionContext(tp) = contextInfo(tp)
3820-
typr.println(i"footprint for $this $hashCode: ${cmp.footprint.toList.map(x => (x, contextInfo(x)))}%, %")
3820+
typr.println(i"footprint for $this $hashCode: ${typeComparer.footprint.toList.map(x => (x, contextInfo(x)))}%, %")
38213821
}
38223822

38233823
def upToDate =

0 commit comments

Comments
 (0)