From 3066bd4c7b2f574748208b7399c68c6c6493206b Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 24 Jun 2014 14:34:05 +0200 Subject: 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)... --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala') 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. -- cgit v1.2.3