@@ -456,13 +456,15 @@ object Types extends TypeUtils {
456456 /** Is this a MethodType for which the parameters will not be used? */
457457 def hasErasedParams (using Context ): Boolean = false
458458
459- /** Is this a match type or a higher-kinded abstraction of one?
460- */
459+ /** Is this a match type or a higher-kinded abstraction of one? */
461460 def isMatch (using Context ): Boolean = stripped match
462461 case tp : MatchType => true
463462 case tp : HKTypeLambda => tp.resType.isMatch
464463 case _ => false
465464
465+ /** Does this application expand to a match type? */
466+ def isMatchAlias (using Context ): Boolean = underlyingMatchType.exists
467+
466468 def underlyingMatchType (using Context ): Type = stripped match {
467469 case tp : MatchType => tp
468470 case tp : HKTypeLambda => tp.resType.underlyingMatchType
@@ -4611,19 +4613,6 @@ object Types extends TypeUtils {
46114613 NoType
46124614 }
46134615
4614- /** Does this application expand to a match type? */
4615- def isMatchAlias (using Context ): Boolean = tycon.stripTypeVar match
4616- case tycon : TypeRef =>
4617- tycon.info match
4618- case AliasingBounds (alias) =>
4619- alias.underlyingMatchType.exists
4620- /* This is the only true case since anything other than
4621- * a TypeRef of an alias with an underlying match type
4622- * should have been already reduced by `appliedTo` in the TypeAssigner.
4623- */
4624- case _ => false
4625- case _ => false
4626-
46274616 /** Is this an unreducible application to wildcard arguments?
46284617 * This is the case if tycon is higher-kinded. This means
46294618 * it is a subtype of a hk-lambda, but not a match alias.
0 commit comments