From 04e6d5e5ad39d046a977de1bfd4563287e5b0f41 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 28 Jul 2016 00:37:38 +0200 Subject: Refine HKApply#superType --- src/dotty/tools/dotc/core/Types.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 3e8a8da21..46da20712 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -2645,7 +2645,7 @@ object Types { if (ctx.period != validSuper) { cachedSuper = tycon match { case tp: TypeLambda => defn.AnyType - case tp: TypeVar => + case tp: TypeVar if !tp.inst.exists => // supertype not stable, since underlying might change return tp.underlying.applyIfParameterized(args) case tp: TypeProxy => tp.superType.applyIfParameterized(args) -- cgit v1.2.3