diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-19 19:04:03 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-06 13:15:29 +0200 |
commit | 15e60e8637887892b0c03e5f6948f1222819a746 (patch) | |
tree | c159c408a26025212d77baac11971291101d9870 /compiler/src/dotty/tools/dotc/core/Types.scala | |
parent | 8d33ca7460493427055daaecca53c66127772831 (diff) | |
download | dotty-15e60e8637887892b0c03e5f6948f1222819a746.tar.gz dotty-15e60e8637887892b0c03e5f6948f1222819a746.tar.bz2 dotty-15e60e8637887892b0c03e5f6948f1222819a746.zip |
Narrow matches from TypeLambda to HKTypeLambda where appropriate
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Types.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index dd314c589..fc6d5f44c 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -539,7 +539,7 @@ object Types { } def goApply(tp: HKApply) = tp.tycon match { - case tl: TypeLambda => + case tl: HKTypeLambda => go(tl.resType).mapInfo(info => tl.derivedLambdaAbstraction(tl.paramNames, tl.paramInfos, info).appliedTo(tp.args)) case _ => @@ -2830,7 +2830,7 @@ object Types { override def superType(implicit ctx: Context): Type = { if (ctx.period != validSuper) { cachedSuper = tycon match { - case tp: TypeLambda => defn.AnyType + case tp: HKTypeLambda => defn.AnyType case tp: TypeVar if !tp.inst.exists => // supertype not stable, since underlying might change return tp.underlying.applyIfParameterized(args) |