-
Notifications
You must be signed in to change notification settings - Fork 21
Closed as not planned
Labels
Milestone
Description
Reproduction steps
Scala version: every version
scala> 42.formatted("%d")
^
warning: method formatted in class StringFormat is deprecated (since 2.12.16): Use `formatString.format(value)` instead of `value.formatted(formatString)`,
or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.
val res0: String = 42
scala> 42.formatted()
^
error: not enough arguments for method formatted: (fmtstr: String): String.
Unspecified value parameter fmtstr.Problem
Although the general rule is to show errors first and then warnings, on the assumption that errors cascade in spurious warnings, even though warnings may reveal what leads to the error, the descriptive text for a symbol in an error message should include whether it is deprecated.
Possibly it is required only when -deprecation is enabled.