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 mutable.HashSet.addAll: remove redundant call to super method #8192
Conversation
Hey, @miteshaghera. Thanks for the PR! Do you think you could add a unit test that validates this fix and ensures it doesn't regress, please? |
@dwijnand Give me some time I'll update unit test which validate this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
could you squash this into a single commit? this looks otherwise ready to merge. |
For a test, I'd suggest something direct:
Putting it in junit form is left as an exercise for the reader. |
Looking at what I wrote, I'm not sure if knownSize should be zero after the iterator is exhausted? Ideally, all the API taking an IterableOnce would be tested that it obeys the contract. Is it a contract if it's just a handshake between two good ole boys that they promise not to call it twice? |
Thanks, I'll add this is as another test as well. Can I use your snippet? |
Yes, please use it in any way if it's helpful. |
I squashed the commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @miteshaghera!
Removed redundant call to super method.
Fixes scala/bug#11601