The following code produces a warning with -Xsource:2.14 (and -deprecation) enabled for the following code:
case class Bar(x: Int)
class Foo(val bar: Bar) extends AnyVal
The warning is:
Auto-application to () is deprecated. Supply the empty argument list () explicitly to invoke method hashCode, or remove the empty argument list from its definition (Java-defined methods are exempt). In Scala 3, an unapplied method like this will be eta-expanded into a function. class Foo(val bar: Bar) extends AnyVal
Seems like the inspection is called on the compiler generated code for AnyVal (and only when the contained value type is some case class) instead of the original one.