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 @@ -4109,18 +4109,17 @@ object Types {
4109
4109
4110
4110
override def underlying (using Context ): Type = tycon
4111
4111
4112
- override def superType (using Context ): Type = {
4113
- if (ctx.period != validSuper) {
4114
- cachedSuper = tycon match {
4112
+ override def superType (using Context ): Type =
4113
+ if ctx.period != validSuper then
4114
+ validSuper = if (tycon.isProvisional) Nowhere else ctx.period
4115
+ cachedSuper = tycon match
4115
4116
case tycon : HKTypeLambda => defn.AnyType
4116
4117
case tycon : TypeRef if tycon.symbol.isClass => tycon
4117
- case tycon : TypeProxy => tycon.superType.applyIfParameterized(args).normalized
4118
+ case tycon : TypeProxy =>
4119
+ if isMatchAlias then validSuper = Nowhere
4120
+ tycon.superType.applyIfParameterized(args).normalized
4118
4121
case _ => defn.AnyType
4119
- }
4120
- validSuper = if (tycon.isProvisional) Nowhere else ctx.period
4121
- }
4122
4122
cachedSuper
4123
- }
4124
4123
4125
4124
override def translucentSuperType (using Context ): Type = tycon match {
4126
4125
case tycon : TypeRef if tycon.symbol.isOpaqueAlias =>
You can’t perform that action at this time.
0 commit comments