Skip to content

Commit 04e6d5e

Browse files
committed
Refine HKApply#superType
1 parent 16a688f commit 04e6d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2645,7 +2645,7 @@ object Types {
26452645
if (ctx.period != validSuper) {
26462646
cachedSuper = tycon match {
26472647
case tp: TypeLambda => defn.AnyType
2648-
case tp: TypeVar =>
2648+
case tp: TypeVar if !tp.inst.exists =>
26492649
// supertype not stable, since underlying might change
26502650
return tp.underlying.applyIfParameterized(args)
26512651
case tp: TypeProxy => tp.superType.applyIfParameterized(args)

0 commit comments

Comments
 (0)