aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/unpickleScala2
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-18 11:48:48 +0100
committerMartin Odersky <odersky@gmail.com>2017-04-06 13:15:28 +0200
commitc67217594bb40e1eab7e567c97bdf29ac0654864 (patch)
treed6f684b1854b5f869c98e444a558aee3878e02a2 /compiler/src/dotty/tools/dotc/core/unpickleScala2
parentdb4f7a19c9329d59da09a4de6b8476b4b6988cdf (diff)
downloaddotty-c67217594bb40e1eab7e567c97bdf29ac0654864.tar.gz
dotty-c67217594bb40e1eab7e567c97bdf29ac0654864.tar.bz2
dotty-c67217594bb40e1eab7e567c97bdf29ac0654864.zip
Eliminate LambdaAbstract
Use fromParams instead.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/unpickleScala2')
-rw-r--r--compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala
index 34cbf4677..cf99bb022 100644
--- a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala
+++ b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala
@@ -42,13 +42,15 @@ object Scala2Unpickler {
/** Convert temp poly type to poly type and leave other types alone. */
def translateTempPoly(tp: Type)(implicit ctx: Context): Type = tp match {
- case TempPolyType(tparams, restpe) => restpe.LambdaAbstract(tparams) // PolyType.fromParams(tparams, restpe)
+ case TempPolyType(tparams, restpe) =>
+ (if (tparams.head.owner.isTerm) PolyType else HKTypeLambda)
+ .fromParams(tparams, restpe)
case tp => tp
}
def addConstructorTypeParams(denot: SymDenotation)(implicit ctx: Context) = {
assert(denot.isConstructor)
- denot.info = denot.info.LambdaAbstract(denot.owner.typeParams)
+ denot.info = PolyType.fromParams(denot.owner.typeParams, denot.info)
}
/** Convert array parameters denoting a repeated parameter of a Java method