Set allows adding of multiple objects that are be Parity::compare($a, $b) === 0. #65

Closed
jmalloc opened this Issue Feb 15, 2014 · 2 comments

Projects

None yet

1 participant

@jmalloc
Member
jmalloc commented Feb 15, 2014

I was trying adding sets of strings to a set in mason.

@jmalloc jmalloc added the defect label Feb 15, 2014
@jmalloc
Member
jmalloc commented Feb 15, 2014

Probably related to object identity comparison, but check on whether Parity should be using it's own compare methods where supported.

@jmalloc jmalloc added this to the 1.1.0 milestone Feb 24, 2014
@jmalloc
Member
jmalloc commented Mar 4, 2014

Ok, so this was intentional it seems. Set uses a custom ObjectIdentityComparator that ensures that objects are ALWAYS compared by identity. In hindsight this was probably a mistake but it's a BC issue. I'll create a new issue to change this in 2.0.

@jmalloc jmalloc closed this Mar 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment