-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Need feedback]: Implemented isEqualToDictionary #49
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
Conversation
👍 |
return false | ||
} | ||
|
||
for (key, value) in _storage { |
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.
Is NSDictionary subclassable? Then iterating over _storage wouldn't use the data from the subclass.
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.
I think the solution here would be to use keyEnumerator()
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.
@gribozavr Just corrected this issue using @amorde suggestion.
It would be great if you included tests. |
Absolutely, I'll incorporate the tests now then do a git rebase. |
This does not handle the CF bridged dictionary case or subclasses; _storage is only available when it is a NSDictionary constructed from swift and not a custom subclass etc. |
Looks good to me; a great follow up for this would definitely be some unit tests. However since it looks pretty cut and dry merging it in. |
Implemented isEqualToDictionary
@phausler O, thanks 😊 |
[swift] Fix folding range for comment.url, comment.mark types
[pull] swiftwasm from master
Implemented isEqualToDictionary and would like some feedback.