Skip to content

Commit 6fe19a8

Browse files
authored
Merge pull request scala/scala#9783 from lrytz/formatted
Deprecate anyVal.formatted(formatString)
2 parents bce0233 + 5b2c44c commit 6fe19a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/src/scala/Predef.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ object Predef extends LowPriorityImplicits with DeprecatedPredef {
327327
* Format strings are as for `String.format`
328328
* (@see java.lang.String.format).
329329
*/
330+
@deprecated("Use `formatString.format(value)` instead of `value.formatted(formatString)`,\nor use the `f\"\"` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.", "2.12.16")
330331
@inline def formatted(fmtstr: String): String = fmtstr format self
331332
}
332333

0 commit comments

Comments
 (0)