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 {
3012
3012
3013
3013
override def superType (implicit ctx : Context ): Type = {
3014
3014
if (ctx.period != validSuper) {
3015
- var canCache = true
3015
+ validSuper = ctx.period
3016
3016
cachedSuper = tycon match {
3017
3017
case tp : HKTypeLambda => defn.AnyType
3018
3018
case tp : TypeVar if ! tp.inst.exists =>
3019
3019
// supertype not stable, since underlying might change
3020
- canCache = false
3020
+ validSuper = Nowhere
3021
3021
tp.underlying.applyIfParameterized(args)
3022
3022
case tp : TypeProxy =>
3023
- canCache = ! tp.typeSymbol.is(Provisional )
3023
+ if ( tp.typeSymbol.is(Provisional )) validSuper = Nowhere
3024
3024
tp.superType.applyIfParameterized(args)
3025
3025
case _ => defn.AnyType
3026
3026
}
3027
- if (canCache) validSuper = ctx.period
3028
3027
}
3029
3028
cachedSuper
3030
3029
}
You can’t perform that action at this time.
0 commit comments