-
Notifications
You must be signed in to change notification settings - Fork 1.2k
NSCopying for NSDictionary #68
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
} else if self.dynamicType === NSMutableDictionary.self { | ||
// Otherwise, create a new NSDictionary object | ||
|
||
// TODO: speed up? |
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.
technically you could create a NSDictionary by returning one created via the storage directly.
As suggested by @phausler.
// Otherwise, create a new NSDictionary object | ||
|
||
let newDict = NSDictionary() | ||
newDict._storage = _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.
generally I would prefer a better isolation of control however the compiler has some issues with NSDictionary.init(dictionary: [NSObject, AnyObject])
the change looks good however this is causing a crash in the compiler for me
|
This functionality has been merged in already that did not have the compiler crashes. |
Completion item returns type name in details
[XFail] Test LLDBB with SwiftPM (56054057)
This patch implements
NSCopying
andNSMutableCopying
protocols inNSDictionary
, as well as creating a couple of test methods for verifying the behavior of the copy methods.