Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare productPrefix in synthetic case class canEqual #21606

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 18, 2024

  1. Compare productPrefix in synthetic case class canEqual

    Since 2.13, case class `hashCode` mixes in the hash code of the
    `productPrefix` string. The synthetic `equals` method has fallen
    out of sync in that regard, so two instances can be equal but have
    different hash codes.
    
    This commit changes the synthetic `canEqual` method to also compare
    the `productPrefix` of the two instances.
    lrytz committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    d125ff7 View commit details
    Browse the repository at this point in the history