@@ -3136,15 +3136,15 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
31363136 case param @ TypeParamRef (b, n) if b eq caseLambda =>
31373137 insts(n) =
31383138 if canApprox then
3139- approximation(param, fromBelow = variance >= 0 , Int .MaxValue ).normalized
3139+ approximation(param, fromBelow = variance >= 0 , Int .MaxValue ).simplified
31403140 else constraint.entry(param) match
31413141 case entry : TypeBounds =>
31423142 val lo = fullLowerBound(param)
31433143 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)
31453145 case inst =>
31463146 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)
31483148 insts
31493149 case _ =>
31503150 foldOver(insts, t)
@@ -3166,11 +3166,6 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
31663166 }
31673167 }
31683168
3169- def normalizeHard (tp : Type ): Type = tp.tryNormalize.orElse(tp match {
3170- case tp : AppliedType => tp.map(normalizeHard)
3171- case _ => tp
3172- })
3173-
31743169 /** Match a single case. */
31753170 def matchCase (cas : Type ): MatchResult = trace(i " $scrut match ${MatchTypeTrace .caseText(cas)}" , matchTypes, show = true ) {
31763171 val cas1 = cas match {
@@ -3234,7 +3229,7 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
32343229 MatchTypeTrace .noInstance(scrut, cas, fails)
32353230 NoType
32363231 case MatchResult .Reduced (tp) =>
3237- normalizeHard(tp)
3232+ tp.simplified
32383233 case Nil =>
32393234 val casesText = MatchTypeTrace .noMatchesText(scrut, cases)
32403235 ErrorType (reporting.MatchTypeNoCases (casesText))
0 commit comments