aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-10 19:38:39 +0100
committerMartin Odersky <odersky@gmail.com>2017-03-14 12:05:29 +0100
commit9d0aa36c879f4bde68e01e0ba9decab21d8fce49 (patch)
treeb8f4e99a9d32f3ba657c9e707d45b91923fdeed9 /compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
parent3a93b3ee128bae804044b25aa7354ce32e074678 (diff)
downloaddotty-9d0aa36c879f4bde68e01e0ba9decab21d8fce49.tar.gz
dotty-9d0aa36c879f4bde68e01e0ba9decab21d8fce49.tar.bz2
dotty-9d0aa36c879f4bde68e01e0ba9decab21d8fce49.zip
Construct MethodTypes from parameter closure
To allow for dependencies between method type parameters, construct MethodTypes from a closure that maps the currently constructed MethodType to its parameter types.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
index 36d478c6d..bfb4daa71 100644
--- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
+++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
@@ -198,8 +198,8 @@ class ClassfileParser(
*/
def stripOuterParamFromConstructor() = innerClasses.get(currentClassName) match {
case Some(entry) if !isStatic(entry.jflags) =>
- val mt @ MethodType(paramnames, paramtypes) = denot.info
- denot.info = mt.derivedMethodType(paramnames.tail, paramtypes.tail, mt.resultType)
+ val mt @ MethodTpe(paramNames, paramTypes, resultType) = denot.info
+ denot.info = mt.derivedMethodType(paramNames.tail, paramTypes.tail, resultType)
case _ =>
}
@@ -207,9 +207,9 @@ class ClassfileParser(
* and make constructor type polymorphic in the type parameters of the class
*/
def normalizeConstructorInfo() = {
- val mt @ MethodType(paramnames, paramtypes) = denot.info
+ val mt @ MethodType(paramNames) = denot.info
val rt = classRoot.typeRef appliedTo (classRoot.typeParams map (_.typeRef))
- denot.info = mt.derivedMethodType(paramnames, paramtypes, rt)
+ denot.info = mt.derivedMethodType(paramNames, mt.paramTypes, rt)
addConstructorTypeParams(denot)
}