@@ -3136,15 +3136,15 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
3136
3136
case param @ TypeParamRef (b, n) if b eq caseLambda =>
3137
3137
insts(n) =
3138
3138
if canApprox then
3139
- approximation(param, fromBelow = variance >= 0 , Int .MaxValue ).normalized
3139
+ approximation(param, fromBelow = variance >= 0 , Int .MaxValue ).simplified
3140
3140
else constraint.entry(param) match
3141
3141
case entry : TypeBounds =>
3142
3142
val lo = fullLowerBound(param)
3143
3143
val hi = fullUpperBound(param)
3144
- if ! poisoned(param) && isSubType(hi, lo) then lo.normalized else Range (lo, hi)
3144
+ if ! poisoned(param) && isSubType(hi, lo) then lo.simplified else Range (lo, hi)
3145
3145
case inst =>
3146
3146
assert(inst.exists, i " param = $param\n constraint = $constraint" )
3147
- if ! poisoned(param) then inst.normalized else Range (inst, inst)
3147
+ if ! poisoned(param) then inst.simplified else Range (inst, inst)
3148
3148
insts
3149
3149
case _ =>
3150
3150
foldOver(insts, t)
@@ -3166,11 +3166,6 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
3166
3166
}
3167
3167
}
3168
3168
3169
- def normalizeHard (tp : Type ): Type = tp.tryNormalize.orElse(tp match {
3170
- case tp : AppliedType => tp.map(normalizeHard)
3171
- case _ => tp
3172
- })
3173
-
3174
3169
/** Match a single case. */
3175
3170
def matchCase (cas : Type ): MatchResult = trace(i " $scrut match ${MatchTypeTrace .caseText(cas)}" , matchTypes, show = true ) {
3176
3171
val cas1 = cas match {
@@ -3234,7 +3229,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
3234
3229
MatchTypeTrace .noInstance(scrut, cas, fails)
3235
3230
NoType
3236
3231
case MatchResult .Reduced (tp) =>
3237
- normalizeHard(tp)
3232
+ tp.simplified
3238
3233
case Nil =>
3239
3234
val casesText = MatchTypeTrace .noMatchesText(scrut, cases)
3240
3235
ErrorType (reporting.MatchTypeNoCases (casesText))
0 commit comments