From cc4c3acf7d0aa9a2e612e228c17dc3f3294f0126 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 13 Dec 2016 14:54:27 +0100 Subject: Fix "wrong number of args" reporting "Wrong number of args" only works for type arguments but was called also for term arguments. Ideally we should have a WrongNumberOfArgs message that works for both, but this will take some refactoring. --- compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala') diff --git a/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala b/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala index a066fc04a..c8d126155 100644 --- a/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala +++ b/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala @@ -55,8 +55,8 @@ object ErrorReporting { errorMsg(ex.show, ctx) } - def wrongNumberOfArgs(fntpe: Type, kind: String, expectedArgs: List[TypeParamInfo], actual: List[untpd.Tree], pos: Position)(implicit ctx: Context) = - errorType(WrongNumberOfArgs(fntpe, kind, expectedArgs, actual)(ctx), pos) + def wrongNumberOfTypeArgs(fntpe: Type, expectedArgs: List[TypeParamInfo], actual: List[untpd.Tree], pos: Position)(implicit ctx: Context) = + errorType(WrongNumberOfTypeArgs(fntpe, expectedArgs, actual)(ctx), pos) class Errors(implicit ctx: Context) { -- cgit v1.2.3