Skip to content

-Xsource:3.0 produces warning for a case class extending AnyVal #11889

Closed
@thesamet

Description

@thesamet

Somewhat similarly to #11657 , the following code:

case class Foo(x: Int) extends AnyVal

produces:

Auto-application to `()` is deprecated. Supply the empty argument list `()` explicitly to invoke method hashCode,
[warn] or remove the empty argument list from its definition (Java-defined methods are exempt).
[warn] In Scala 3, an unapplied method like this will be eta-expanded into a function.

when compiling with -Xsource:3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions