aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 817053868..092c78d4f 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -586,6 +586,9 @@ class Typer extends Namer with Applications with Implicits {
errorType(s"missing parameter type for parameter ${param.name}$ofFun, expected = ${pt.show}", param.pos)
}
+ if (protoFormals.length != params.length)
+ ctx.error(s"wrong number of parameters, expected: ${protoFormals.length}", tree.pos)
+
val inferredParams: List[untpd.ValDef] =
for ((param, formal) <- params zip protoFormals) yield
if (!param.tpt.isEmpty) param