From 31ab8804d611343eb3cf35e2c1b929d5b65a946e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 16 Mar 2017 17:07:10 +0100 Subject: 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. --- .../src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/core/unpickleScala2') 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) = -- cgit v1.2.3