File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -3012,19 +3012,18 @@ object Types {
30123012
30133013 override def superType (implicit ctx : Context ): Type = {
30143014 if (ctx.period != validSuper) {
3015- var canCache = true
3015+ validSuper = ctx.period
30163016 cachedSuper = tycon match {
30173017 case tp : HKTypeLambda => defn.AnyType
30183018 case tp : TypeVar if ! tp.inst.exists =>
30193019 // supertype not stable, since underlying might change
3020- canCache = false
3020+ validSuper = Nowhere
30213021 tp.underlying.applyIfParameterized(args)
30223022 case tp : TypeProxy =>
3023- canCache = ! tp.typeSymbol.is(Provisional )
3023+ if ( tp.typeSymbol.is(Provisional )) validSuper = Nowhere
30243024 tp.superType.applyIfParameterized(args)
30253025 case _ => defn.AnyType
30263026 }
3027- if (canCache) validSuper = ctx.period
30283027 }
30293028 cachedSuper
30303029 }
You can’t perform that action at this time.
0 commit comments