Skip to content

Commit 2d3e90e

Browse files
committed
Fix deprecation messages missing a position
`pos` was accidentally passed as a fourth argument to `format` and ignored instead of as a second argument to `deprecationWarning`.
1 parent a447c5b commit 2d3e90e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ object RefChecks {
641641
// in either a deprecated member or a scala bridge method, issue a warning.
642642
if (sym.isDeprecated && !ctx.owner.ownersIterator.exists(_.isDeprecated)) {
643643
ctx.deprecationWarning("%s%s is deprecated%s".format(
644-
sym, sym.showLocated, sym.deprecationMessage map (": " + _) getOrElse "", pos))
644+
sym, 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)