mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
This commit is contained in:
@@ -121,13 +121,13 @@ func isNativeSet<T : Hashable>(s: Set<T>) -> Bool {
|
||||
|
||||
func isNativeNSSet(s: NSSet) -> Bool {
|
||||
let className: NSString = NSStringFromClass(s.dynamicType)
|
||||
return className.range(of: "NativeSetStorage").length > 0
|
||||
return className.rangeOf("NativeSetStorage").length > 0
|
||||
}
|
||||
|
||||
func isCocoaNSSet(s: NSSet) -> Bool {
|
||||
let className: NSString = NSStringFromClass(s.dynamicType)
|
||||
return className.range(of: "NSSet").length > 0 ||
|
||||
className.range(of: "NSCFSet").length > 0
|
||||
return className.rangeOf("NSSet").length > 0 ||
|
||||
className.rangeOf("NSCFSet").length > 0
|
||||
}
|
||||
|
||||
func getBridgedEmptyNSSet() -> NSSet {
|
||||
@@ -1169,7 +1169,8 @@ class CustomImmutableNSSet : NSSet {
|
||||
fatalError("init(coder:) not implemented by CustomImmutableNSSet")
|
||||
}
|
||||
|
||||
@objc override func copy(withZone zone: NSZone) -> AnyObject {
|
||||
@objc(copyWithZone:)
|
||||
override func copy(with zone: NSZone) -> AnyObject {
|
||||
++CustomImmutableNSSet.timesCopyWithZoneWasCalled
|
||||
return self
|
||||
}
|
||||
@@ -3415,7 +3416,8 @@ class MockSetWithCustomCount : NSSet {
|
||||
fatalError("init(coder:) not implemented by MockSetWithCustomCount")
|
||||
}
|
||||
|
||||
@objc override func copy(withZone zone: NSZone) -> AnyObject {
|
||||
@objc(copyWithZone:)
|
||||
override func copy(with zone: NSZone) -> AnyObject {
|
||||
// Ensure that copying this set produces an object of the same
|
||||
// dynamic type.
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user