aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-12-13 14:54:27 +0100
committerMartin Odersky <odersky@gmail.com>2016-12-17 18:34:27 +0100
commitcc4c3acf7d0aa9a2e612e228c17dc3f3294f0126 (patch)
tree8b4b0b2bc3621c96a5e48f1756af3c515ceb8e45 /compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala
parentc9f666f7c21df45bf085ff2d6f6b0fbd7d01c72d (diff)
downloaddotty-cc4c3acf7d0aa9a2e612e228c17dc3f3294f0126.tar.gz
dotty-cc4c3acf7d0aa9a2e612e228c17dc3f3294f0126.tar.bz2
dotty-cc4c3acf7d0aa9a2e612e228c17dc3f3294f0126.zip
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.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/ErrorReporting.scala4
1 files changed, 2 insertions, 2 deletions
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) {