aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/unpickleScala2
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-16 17:07:10 +0100
committerMartin Odersky <odersky@gmail.com>2017-04-06 13:15:28 +0200
commit31ab8804d611343eb3cf35e2c1b929d5b65a946e (patch)
tree886cce4d249fdcca4de5d9b5e10c627d23c346b4 /compiler/src/dotty/tools/dotc/core/unpickleScala2
parentc024a6037f3dd7e7458d936566cd4b653b8b7545 (diff)
downloaddotty-31ab8804d611343eb3cf35e2c1b929d5b65a946e.tar.gz
dotty-31ab8804d611343eb3cf35e2c1b929d5b65a946e.tar.bz2
dotty-31ab8804d611343eb3cf35e2c1b929d5b65a946e.zip
Harmonize paramTypes and paramBounds
MethodTypes have paramTypes whereas PolyTypes have paramBounds. We now harmonize by alling both paramInfos, and parameterizing types that will become common to both.
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, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala
index 688a2d007..fad516da7 100644
--- a/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala
+++ b/compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala
@@ -56,7 +56,7 @@ object Scala2Unpickler {
*/
def arrayToRepeated(tp: Type)(implicit ctx: Context): Type = tp match {
case tp: MethodType =>
- val lastArg = tp.paramTypes.last
+ val lastArg = tp.paramInfos.last
assert(lastArg isRef defn.ArrayClass)
val elemtp0 :: Nil = lastArg.baseArgInfos(defn.ArrayClass)
val elemtp = elemtp0 match {
@@ -67,10 +67,10 @@ object Scala2Unpickler {
}
tp.derivedMethodType(
tp.paramNames,
- tp.paramTypes.init :+ defn.RepeatedParamType.appliedTo(elemtp),
+ tp.paramInfos.init :+ defn.RepeatedParamType.appliedTo(elemtp),
tp.resultType)
case tp: PolyType =>
- tp.derivedPolyType(tp.paramNames, tp.paramBounds, arrayToRepeated(tp.resultType))
+ tp.derivedPolyType(tp.paramNames, tp.paramInfos, arrayToRepeated(tp.resultType))
}
def ensureConstructor(cls: ClassSymbol, scope: Scope)(implicit ctx: Context) =