Skip to content

Commit 16b33a9

Browse files
Mark AppliedType cachedSuper valid Nowhere when using provisional args
1 parent c6fbe6f commit 16b33a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -4643,7 +4643,9 @@ object Types extends TypeUtils {
46434643
cachedSuper = tycon match
46444644
case tycon: HKTypeLambda => defn.AnyType
46454645
case tycon: TypeRef if tycon.symbol.isClass => tycon
4646-
case tycon: TypeProxy => tycon.superType.applyIfParameterized(args)
4646+
case tycon: TypeProxy =>
4647+
if validSuper != Nowhere && args.exists(_.isProvisional) then validSuper = Nowhere
4648+
tycon.superType.applyIfParameterized(args)
46474649
case _ => defn.AnyType
46484650
cachedSuper
46494651

0 commit comments

Comments
 (0)