File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -4105,18 +4105,17 @@ object Types {
41054105
41064106 override def underlying (using Context ): Type = tycon
41074107
4108- override def superType (using Context ): Type = {
4109- if (ctx.period != validSuper) {
4110- cachedSuper = tycon match {
4108+ override def superType (using Context ): Type =
4109+ if ctx.period != validSuper then
4110+ validSuper = if (tycon.isProvisional) Nowhere else ctx.period
4111+ cachedSuper = tycon match
41114112 case tycon : HKTypeLambda => defn.AnyType
41124113 case tycon : TypeRef if tycon.symbol.isClass => tycon
4113- case tycon : TypeProxy => tycon.superType.applyIfParameterized(args).normalized
4114+ case tycon : TypeProxy =>
4115+ if isMatchAlias then validSuper = Nowhere
4116+ tycon.superType.applyIfParameterized(args).normalized
41144117 case _ => defn.AnyType
4115- }
4116- validSuper = if (tycon.isProvisional) Nowhere else ctx.period
4117- }
41184118 cachedSuper
4119- }
41204119
41214120 override def translucentSuperType (using Context ): Type = tycon match {
41224121 case tycon : TypeRef if tycon.symbol.isOpaqueAlias =>
You can’t perform that action at this time.
0 commit comments