diff --git a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala index 4715873e5483..7cfe204e3b02 100644 --- a/compiler/src/dotty/tools/dotc/typer/RefChecks.scala +++ b/compiler/src/dotty/tools/dotc/typer/RefChecks.scala @@ -640,8 +640,8 @@ object RefChecks { // 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 && !ctx.owner.ownersIterator.exists(_.isDeprecated)) { - ctx.deprecationWarning("%s%s is deprecated%s".format( - sym, sym.showLocated, sym.deprecationMessage map (": " + _) getOrElse "", pos)) + ctx.deprecationWarning("%s is deprecated%s".format( + sym.showLocated, sym.deprecationMessage map (": " + _) getOrElse ""), pos) } // Similar to deprecation: check if the symbol is marked with @migration // indicating it has changed semantics between versions.