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

Fix equals when comparing two PowerSet instances with different order #3891

Conversation

RyanSkonnord
Copy link
Contributor

Fixes #3890

If two PowerSet instances are constructed from Sets with the same
elements but different iteraton order, PowerSet.equals will incorrectly
return false.
@nick-someone
Copy link
Member

Thanks for the improvement! That certainly does look like a bug, and I appreciate the reproducing test.

I'll mirror this change internally, and you should see it added back out later today or tomorrow.

@RyanSkonnord
Copy link
Contributor Author

Cool; thank you! 😁 I'm very glad to have helped.

@nick-someone nick-someone mentioned this pull request May 4, 2020
nick-someone pushed a commit that referenced this pull request May 4, 2020
…are the same, but in a different iteration order.

RELNOTES:
  Fix issue where PowerSet.equals(PowerSet) would erroneously return
  false if the PowerSet's underlying Sets were equal, but in a different
  iteration order.

Fixes #3891, #3890

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=309745434
nick-someone pushed a commit that referenced this pull request May 4, 2020
…are the same, but in a different iteration order.

RELNOTES:
  Fix issue where PowerSet.equals(PowerSet) would erroneously return
  false if the PowerSet's underlying Sets were equal, but in a different
  iteration order.

Fixes #3891, #3890

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=309745434
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PowerSet.equals depends on set's iteration order
4 participants