Skip to content

equals should be marked as infix for Scala 3.4 #19299

Open
@soronpo

Description

@soronpo

Scala 3.4 introduces warnings on alphanumeric method application in infix positioning if such methods are not explicitly marked with infix. I think equals should be marked as infix, as it is naturally used in infix positioning.

Compiler version

3.4.nightly

Minimized code

val x = 1 equals 1

Output

Alphanumeric method equals is not declared infix; it should not be used as infix operator.
Instead, use method syntax .equals(...) or backticked identifier `equals`.
The latter can be rewritten automatically under -rewrite -source 3.4-migration.

Expectation

No warnings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions