diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-17 22:32:10 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-09-17 22:33:14 +0200 |
commit | 528f6b0524c465a3e795aa5bb538c680956bf6d2 (patch) | |
tree | 2a0f48e7f1ea2c9a52c15d0c9038712173804d41 /src/dotty/tools/dotc/typer/Applications.scala | |
parent | c420b4cc0573e88bf301d4e020e2ad91b26806d0 (diff) | |
download | dotty-528f6b0524c465a3e795aa5bb538c680956bf6d2.tar.gz dotty-528f6b0524c465a3e795aa5bb538c680956bf6d2.tar.bz2 dotty-528f6b0524c465a3e795aa5bb538c680956bf6d2.zip |
Fix #1503 - be careful where to insert an apply.
`apply` nodes should not be inserted in the result parts
of a block, if-then-else, match, or try. Instead they should
be added to the surrounding statement.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Applications.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index a9212e5d6..20850e21d 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -652,7 +652,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic => /** Overridden in ReTyper to handle primitive operations that can be generated after erasure */ protected def handleUnexpectedFunType(tree: untpd.Apply, fun: Tree)(implicit ctx: Context): Tree = - throw new Error(s"unexpected type.\n fun = $fun,\n methPart(fun) = ${methPart(fun)},\n methPart(fun).tpe = ${methPart(fun).tpe},\n tpe = ${fun.tpe}") + throw new Error(i"unexpected type.\n fun = $fun,\n methPart(fun) = ${methPart(fun)},\n methPart(fun).tpe = ${methPart(fun).tpe},\n tpe = ${fun.tpe}") def typedNamedArgs(args: List[untpd.Tree])(implicit ctx: Context) = for (arg @ NamedArg(id, argtpt) <- args) yield { |