aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/ReTyper.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/typer/ReTyper.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/typer/ReTyper.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/ReTyper.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/ReTyper.scala b/compiler/src/dotty/tools/dotc/typer/ReTyper.scala
index 3252ead47..6080c6644 100644
--- a/compiler/src/dotty/tools/dotc/typer/ReTyper.scala
+++ b/compiler/src/dotty/tools/dotc/typer/ReTyper.scala
@@ -85,8 +85,8 @@ class ReTyper extends Typer {
override def encodeName(tree: untpd.NameTree)(implicit ctx: Context) = tree
override def handleUnexpectedFunType(tree: untpd.Apply, fun: Tree)(implicit ctx: Context): Tree = fun.tpe match {
- case mt @ MethodType(_, formals) =>
- val args: List[Tree] = tree.args.zipWithConserve(formals)(typedExpr(_, _)).asInstanceOf[List[Tree]]
+ case mt: MethodType =>
+ val args: List[Tree] = tree.args.zipWithConserve(mt.paramTypes)(typedExpr(_, _)).asInstanceOf[List[Tree]]
assignType(untpd.cpy.Apply(tree)(fun, args), fun, args)
case _ =>
super.handleUnexpectedFunType(tree, fun)