Skip to content

Equals in scalagen is wrong #936

@matteuan

Description

@matteuan

I'm using the release 0.5.1 with generated scala classes. The generation of equals add this to the code:

 if (other == this) {
        return true;
 }

This is correct in Java, but doesn't work in Scala, since == is the same as equals. This problem creates an infinite loop of comparisons that produces StackOverflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions