@@ -456,13 +456,15 @@ object Types extends TypeUtils {
456
456
/** Is this a MethodType for which the parameters will not be used? */
457
457
def hasErasedParams (using Context ): Boolean = false
458
458
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? */
461
460
def isMatch (using Context ): Boolean = stripped match
462
461
case tp : MatchType => true
463
462
case tp : HKTypeLambda => tp.resType.isMatch
464
463
case _ => false
465
464
465
+ /** Does this application expand to a match type? */
466
+ def isMatchAlias (using Context ): Boolean = underlyingMatchType.exists
467
+
466
468
def underlyingMatchType (using Context ): Type = stripped match {
467
469
case tp : MatchType => tp
468
470
case tp : HKTypeLambda => tp.resType.underlyingMatchType
@@ -4611,19 +4613,6 @@ object Types extends TypeUtils {
4611
4613
NoType
4612
4614
}
4613
4615
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
-
4627
4616
/** Is this an unreducible application to wildcard arguments?
4628
4617
* This is the case if tycon is higher-kinded. This means
4629
4618
* it is a subtype of a hk-lambda, but not a match alias.
0 commit comments