File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -4105,6 +4105,21 @@ object Types {
41054105
41064106 override def underlying (using Context ): Type = tycon
41074107
4108+ override def superType (using Context ): Type =
4109+ if ctx.period != validSuper then
4110+ validSuper = if (tycon.isProvisional) Nowhere else ctx.period
4111+ def reappliedSuper = tycon.superType.applyIfParameterized(args).normalized
4112+ cachedSuper = tycon match
4113+ case tycon : HKTypeLambda => defn.AnyType
4114+ case tycon : TypeRef =>
4115+ if tycon.symbol.isClass then tycon
4116+ else
4117+ if tycon.info.isInstanceof[MatchAlias ] then validSuper = Nowhere
4118+ reappliedSuper
4119+ case tycon : TypeProxy => reappliedSuper
4120+ case _ => defn.AnyType
4121+ cachedSuper
4122+
41084123 override def superType (using Context ): Type = {
41094124 if (ctx.period != validSuper) {
41104125 cachedSuper = tycon match {
You can’t perform that action at this time.
0 commit comments