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/Typers.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/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 349bad555a..2c31ef2e8e 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -942,7 +942,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper def adaptConstant(value: Constant): Tree = { val sym = tree.symbol if (sym != null && sym.isDeprecated) - context.deprecationWarning(tree.pos, sym, s"${sym.toString}${sym.locationString} is deprecated: ${sym.deprecationMessage.getOrElse("")}") + context.deprecationWarning(tree.pos, sym) treeCopy.Literal(tree, value) } |