Skip to content

Commit 4da439d

Browse files
author
Max Moiseev
committed
copy(withZone:) => copy(with:) in ShadowProtocols
1 parent 1fae0d1 commit 4da439d

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

stdlib/public/SDK/Foundation/Foundation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ extension Dictionary {
550550
// and watchOS.
551551
self = Dictionary(
552552
_immutableCocoaDictionary:
553-
unsafeBitCast(_cocoaDictionary.copy(withZone: nil), to: _NSDictionary.self))
553+
unsafeBitCast(_cocoaDictionary.copy(with: nil), to: _NSDictionary.self))
554554
}
555555
}
556556

@@ -762,7 +762,7 @@ extension Set {
762762
// and watchOS.
763763
self = Set(
764764
_immutableCocoaSet:
765-
unsafeBitCast(_cocoaSet.copy(withZone: nil), to: _NSSet.self))
765+
unsafeBitCast(_cocoaSet.copy(with: nil), to: _NSSet.self))
766766
}
767767
}
768768

stdlib/public/core/Arrays.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ if True:
158158
/// -------------------------
159159
///
160160
/// An `NSArray` can be implicitly or explicitly converted to any
161-
/// bridged `Array<Element>`. This conversion calls `copy(withZone:)`
161+
/// bridged `Array<Element>`. This conversion calls `copy(with:)`
162162
/// on the `NSArray`, to ensure it won't be modified, and stores the
163163
/// result in the `Array`. Type-checking, to ensure the `NSArray`'s
164164
/// elements match or can be bridged to `Element`, is deferred until the

stdlib/public/core/HashedCollections.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,7 +2524,7 @@ final internal class _Native${Self}StorageOwner<${TypeParametersDecl}>
25242524

25252525
@objc(copyWithZone:)
25262526
@warn_unused_result
2527-
internal func copy(withZone zone: _SwiftNSZone) -> AnyObject {
2527+
internal func copy(with zone: _SwiftNSZone) -> AnyObject {
25282528
// Instances of this class should be visible outside of standard library as
25292529
// having `NSSet` type, which is immutable.
25302530
return self
@@ -2561,7 +2561,7 @@ final internal class _Native${Self}StorageOwner<${TypeParametersDecl}>
25612561

25622562
@objc(copyWithZone:)
25632563
@warn_unused_result
2564-
internal func copy(withZone zone: _SwiftNSZone) -> AnyObject {
2564+
internal func copy(with zone: _SwiftNSZone) -> AnyObject {
25652565
// Instances of this class should be visible outside of standard library as
25662566
// having `NSDictionary` type, which is immutable.
25672567
return self

stdlib/public/core/ShadowProtocols.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public typealias _SwiftNSZone = OpaquePointer
5050
@objc
5151
public protocol _NSCopying : _ShadowProtocol {
5252
@objc(copyWithZone:)
53-
func copy(withZone zone: _SwiftNSZone) -> AnyObject
53+
func copy(with zone: _SwiftNSZone) -> AnyObject
5454
}
5555

5656
/// A shadow for the "core operations" of NSArray.
@@ -101,7 +101,7 @@ public protocol _NSDictionaryCore :
101101
// We also override the following methods for efficiency.
102102

103103
@objc(copyWithZone:)
104-
func copy(withZone zone: _SwiftNSZone) -> AnyObject
104+
func copy(with zone: _SwiftNSZone) -> AnyObject
105105

106106
func getObjects(objects: UnsafeMutablePointer<AnyObject>,
107107
andKeys keys: UnsafeMutablePointer<AnyObject>)
@@ -150,7 +150,7 @@ public protocol _NSSetCore :
150150
// We also override the following methods for efficiency.
151151

152152
@objc(copyWithZone:)
153-
func copy(withZone zone: _SwiftNSZone) -> AnyObject
153+
func copy(with zone: _SwiftNSZone) -> AnyObject
154154

155155
@objc(countByEnumeratingWithState:objects:count:)
156156
func countByEnumeratingWith(

stdlib/public/core/SwiftNativeNSArray.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ extension _SwiftNativeNSArrayWithContiguousStorage : _NSArrayCore {
112112
}
113113

114114
@objc(copyWithZone:)
115-
internal func copy(withZone _: _SwiftNSZone) -> AnyObject {
115+
internal func copy(with _: _SwiftNSZone) -> AnyObject {
116116
return self
117117
}
118118
}

0 commit comments

Comments
 (0)