summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-06-24 14:34:05 +0200
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-07-04 15:49:08 +0200
commit3066bd4c7b2f574748208b7399c68c6c6493206b (patch)
tree468e6a379198f0236a3e8f7d4918992ec13471ed /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent9fc68e19309cef139c4827fbed76952011995e10 (diff)
downloadscala-3066bd4c7b2f574748208b7399c68c6c6493206b.tar.gz
scala-3066bd4c7b2f574748208b7399c68c6c6493206b.tar.bz2
scala-3066bd4c7b2f574748208b7399c68c6c6493206b.zip
Encapsulate deprecation warning message synthesis.
Both refchecks and typer constructed the same message. But different. Now with more DRYness. Note that no check files had to be updated (disconcerting)...
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 1c84f8d759..1b3da26bf2 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1288,7 +1288,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
// If symbol is deprecated, and the point of reference is not enclosed
// in either a deprecated member or a scala bridge method, issue a warning.
if (sym.isDeprecated && !currentOwner.ownerChain.exists(x => x.isDeprecated || x.hasBridgeAnnotation))
- currentRun.reporting.deprecationWarning(pos, sym, s"${sym}${sym.locationString} is deprecated${sym.deprecationMessage map (": " + _) getOrElse ""}")
+ currentRun.reporting.deprecationWarning(pos, sym)
// Similar to deprecation: check if the symbol is marked with @migration
// indicating it has changed semantics between versions.