File tree 1 file changed +7
-8
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -4105,18 +4105,17 @@ object Types {
4105
4105
4106
4106
override def underlying (using Context ): Type = tycon
4107
4107
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
4111
4112
case tycon : HKTypeLambda => defn.AnyType
4112
4113
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
4114
4117
case _ => defn.AnyType
4115
- }
4116
- validSuper = if (tycon.isProvisional) Nowhere else ctx.period
4117
- }
4118
4118
cachedSuper
4119
- }
4120
4119
4121
4120
override def translucentSuperType (using Context ): Type = tycon match {
4122
4121
case tycon : TypeRef if tycon.symbol.isOpaqueAlias =>
You can’t perform that action at this time.
0 commit comments