Skip to content

Commit 4897be1

Browse files
authored
Merge pull request #2332 from dotty-staging/fix/deprecation-pos
Fix deprecation messages missing a position
2 parents 10a2ce6 + 738a638 commit 4897be1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,8 @@ object RefChecks {
640640
// If symbol is deprecated, and the point of reference is not enclosed
641641
// in either a deprecated member or a scala bridge method, issue a warning.
642642
if (sym.isDeprecated && !ctx.owner.ownersIterator.exists(_.isDeprecated)) {
643-
ctx.deprecationWarning("%s%s is deprecated%s".format(
644-
sym, sym.showLocated, sym.deprecationMessage map (": " + _) getOrElse "", pos))
643+
ctx.deprecationWarning("%s is deprecated%s".format(
644+
sym.showLocated, sym.deprecationMessage map (": " + _) getOrElse ""), pos)
645645
}
646646
// Similar to deprecation: check if the symbol is marked with @migration
647647
// indicating it has changed semantics between versions.

0 commit comments

Comments
 (0)