summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-06-23 17:49:59 +0200
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-07-04 15:49:07 +0200
commit59db57f5ac26609186d6338d2d7cfaf1281b78ab (patch)
treed599b985b5ac5b9f4cb23ef44c60b9bce0d1fcd5 /src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
parente08735380e8cba8f4b7230f5615e528782a0111a (diff)
downloadscala-59db57f5ac26609186d6338d2d7cfaf1281b78ab.tar.gz
scala-59db57f5ac26609186d6338d2d7cfaf1281b78ab.tar.bz2
scala-59db57f5ac26609186d6338d2d7cfaf1281b78ab.zip
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.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala2
1 files changed, 1 insertions, 1 deletions
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