aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeApplications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-03-05 10:09:55 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-03-18 11:14:14 +0100
commit7fd242f2f1b1d2f536e73ec0fdb92a34b27b2a89 (patch)
tree00abf33212527f2204571777ca1793ffcf7fabbe /src/dotty/tools/dotc/core/TypeApplications.scala
parenta4b2a67fa5d58f7dbd34b8876e8a87e309524e22 (diff)
downloaddotty-7fd242f2f1b1d2f536e73ec0fdb92a34b27b2a89.tar.gz
dotty-7fd242f2f1b1d2f536e73ec0fdb92a34b27b2a89.tar.bz2
dotty-7fd242f2f1b1d2f536e73ec0fdb92a34b27b2a89.zip
More fixes to pickling
- treat applied higher-kinded types specially when pickling ( drop #Apply projection) - pickle the original self info sintead of the processed self type
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeApplications.scala')
-rw-r--r--src/dotty/tools/dotc/core/TypeApplications.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala
index 6f75142c4..02526a30b 100644
--- a/src/dotty/tools/dotc/core/TypeApplications.scala
+++ b/src/dotty/tools/dotc/core/TypeApplications.scala
@@ -132,8 +132,8 @@ class TypeApplications(val self: Type) extends AnyVal {
LambdaClass(forcing = false).exists
/** Is type `tp` a Lambda with all Arg$ fields fully instantiated? */
- def isInstantiatedLambda(tp: Type)(implicit ctx: Context): Boolean =
- tp.isSafeLambda && tp.typeParams.isEmpty
+ def isInstantiatedLambda(implicit ctx: Context): Boolean =
+ isSafeLambda && typeParams.isEmpty
/** Encode the type resulting from applying this type to given arguments */
final def appliedTo(args: List[Type])(implicit ctx: Context): Type = /*>|>*/ track("appliedTo") /*<|<*/ {
@@ -188,7 +188,7 @@ class TypeApplications(val self: Type) extends AnyVal {
if (args.isEmpty || ctx.erasedTypes) self
else {
val res = instantiate(self, self)
- if (isInstantiatedLambda(res)) res.select(tpnme.Apply) else res
+ if (res.isInstantiatedLambda) res.select(tpnme.Apply) else res
}
}