Skip to content

fix 11551. use == instead of equals in BitmapIndexedSetNode#8117

Merged
adriaanm merged 1 commit intoscala:2.13.xfrom
xuwei-k:fix-11551
Jun 3, 2019
Merged

fix 11551. use == instead of equals in BitmapIndexedSetNode#8117
adriaanm merged 1 commit intoscala:2.13.xfrom
xuwei-k:fix-11551

Conversation

@xuwei-k
Copy link
Contributor

@xuwei-k xuwei-k commented Jun 2, 2019

@xuwei-k xuwei-k added the library:collections PRs involving changes to the standard collection library label Jun 2, 2019
@scala-jenkins scala-jenkins added this to the 2.13.1 milestone Jun 2, 2019
@NthPortal
Copy link
Contributor

What I don't understand is why that change fixes anything (and/or why it was broken in the first place). equals works fine for j.l.Integer.

@SethTisue SethTisue modified the milestones: 2.13.1, 2.13.0 Jun 2, 2019
@SethTisue
Copy link
Member

I've tentatively put this on a new 2.13.0 milestone, since it seems like something that could mergeable without a further RC. @adriaanm will make the final call

@dwijnand
Copy link
Member

dwijnand commented Jun 2, 2019

@NthPortal you need to pick to either use equals and hashCode and ignore collaborative equality/hashing (which is faster but some things are "weird"), or you use == and ## (and pay the performance cost). When you're inconsistent these issues crop up (subjectively, worst of both worlds). Notice the use of ##s in HashSet.

@NthPortal
Copy link
Contributor

oh oops - I didn't notice that one was 1 and one was 1L

@adriaanm
Copy link
Contributor

adriaanm commented Jun 3, 2019

Let's ship this in 2.13.0. Thank you, @xuwei-k!

@adriaanm adriaanm merged commit 6f02f40 into scala:2.13.x Jun 3, 2019
@xuwei-k xuwei-k deleted the fix-11551 branch January 27, 2021 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

library:collections PRs involving changes to the standard collection library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set broken in Scala 2.13.0-RC3

8 participants