You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const first = immutable.Map({ foo: true, valid: false })
const second = immutable.Map({ foo: false, valid: true })
These two objects have the same keys but swapped boolean values.
I noticed that they have the same hashCode. I would've assumed the hashCode is different since all I did is swap the boolean values for the two keys. This also seems to happen for these specific combination of words since the hashCode is different if I swap valid for bar.
How to reproduce
Create the two immutable.Map instances and look at the hashCode
The text was updated successfully, but these errors were encountered:
What happened
I created two
immutable.Map
instances as follows:These two objects have the same keys but swapped boolean values.
I noticed that they have the same
hashCode
. I would've assumed thehashCode
is different since all I did is swap the boolean values for the two keys. This also seems to happen for these specific combination of words since thehashCode
is different if I swapvalid
forbar
.How to reproduce
Create the two
immutable.Map
instances and look at thehashCode
The text was updated successfully, but these errors were encountered: