From 59db57f5ac26609186d6338d2d7cfaf1281b78ab Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Mon, 23 Jun 2014 17:49:59 +0200 Subject: Route type checker reporting through context Continue the work started in SI-8450 (no "implicit numeric widening" warning in silent mode), which was caused by going straight to the reporter instead of using the context for type error reporting (which buffers in silent mode). Ideally, this mistake should not be possible: typer should change the current reporter to buffer where appropriate. --- src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala') diff --git a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala index 65f33952d3..43902d1c65 100644 --- a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala +++ b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala @@ -536,7 +536,7 @@ trait NamesDefaults { self: Analyzer => def matchesName(param: Symbol) = !param.isSynthetic && ( (param.name == name) || (param.deprecatedParamName match { case Some(`name`) => - context0.unit.deprecationWarning(arg.pos, param, + context0.deprecationWarning(arg.pos, param, s"the parameter name $name has been deprecated. Use ${param.name} instead.") true case _ => false -- cgit v1.2.3