diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-06-24 14:34:05 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-04 15:49:08 +0200 |
commit | 3066bd4c7b2f574748208b7399c68c6c6493206b (patch) | |
tree | 468e6a379198f0236a3e8f7d4918992ec13471ed /src/compiler/scala/tools/nsc/typechecker/Contexts.scala | |
parent | 9fc68e19309cef139c4827fbed76952011995e10 (diff) | |
download | scala-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/Contexts.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 20f0405d1b..72ca9b879a 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -595,6 +595,8 @@ trait Contexts { self: Analyzer => def deprecationWarning(pos: Position, sym: Symbol, msg: String): Unit = currentRun.reporting.deprecationWarning(pos, sym, msg) + def deprecationWarning(pos: Position, sym: Symbol): Unit = + currentRun.reporting.deprecationWarning(pos, sym) // TODO: allow this to escalate to an error, and implicit search will ignore deprecated implicits def featureWarning(pos: Position, featureName: String, featureDesc: String, featureTrait: Symbol, construct: => String = "", required: Boolean): Unit = currentRun.reporting.featureWarning(pos, featureName, featureDesc, featureTrait, construct, required) |