Skip to content

Commit 8cf6fc0

Browse files
authored
Merge pull request #3779 from apple/stdlib-remove-unneeded-at-objc
2 parents c2f07a6 + 168b563 commit 8cf6fc0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

stdlib/public/SDK/Foundation/Foundation.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ extension NSArray {
12091209
///
12101210
/// Discussion: After an immutable array has been initialized in
12111211
/// this way, it cannot be modified.
1212-
@objc(_swiftInitWithArray_NSArray:)
1212+
@nonobjc
12131213
public convenience init(array anArray: NSArray) {
12141214
self.init(array: anArray as Array)
12151215
}
@@ -1222,7 +1222,7 @@ extension NSString {
12221222
/// - Returns: An `NSString` object initialized by copying the
12231223
/// characters from `aString`. The returned object may be different
12241224
/// from the original receiver.
1225-
@objc(_swiftInitWithString_NSString:)
1225+
@nonobjc
12261226
public convenience init(string aString: NSString) {
12271227
self.init(string: aString as String)
12281228
}
@@ -1235,7 +1235,7 @@ extension NSSet {
12351235
/// - Returns: An initialized objects set containing the objects from
12361236
/// `set`. The returned set might be different than the original
12371237
/// receiver.
1238-
@objc(_swiftInitWithSet_NSSet:)
1238+
@nonobjc
12391239
public convenience init(set anSet: NSSet) {
12401240
// FIXME: This is a bit weird. Maybe there's a better way?
12411241
self.init(set: anSet as Set<NSObject> as Set<AnyHashable>)
@@ -1354,6 +1354,7 @@ extension NSCoder {
13541354
return NS_Swift_NSCoder_decodeObjectOfClassesForKey(self as AnyObject, classesAsNSObjects, key as AnyObject, nil).map { $0 as Any }
13551355
}
13561356

1357+
@nonobjc
13571358
@available(OSX 10.11, iOS 9.0, *)
13581359
public func decodeTopLevelObject() throws -> Any? {
13591360
var error: NSError?
@@ -1367,6 +1368,7 @@ extension NSCoder {
13671368
fatalError("This API has been renamed")
13681369
}
13691370

1371+
@nonobjc
13701372
@available(OSX 10.11, iOS 9.0, *)
13711373
public func decodeTopLevelObject(forKey key: String) throws -> AnyObject? {
13721374
var error: NSError?
@@ -1394,11 +1396,13 @@ extension NSCoder {
13941396
return result as? DecodedObjectType
13951397
}
13961398

1399+
@nonobjc
13971400
@available(*, unavailable, renamed: "decodeTopLevelObject(of:forKey:)")
13981401
public func decodeTopLevelObjectOfClasses(_ classes: NSSet?, forKey key: String) throws -> AnyObject? {
13991402
fatalError("This API has been renamed")
14001403
}
14011404

1405+
@nonobjc
14021406
@available(OSX 10.11, iOS 9.0, *)
14031407
public func decodeTopLevelObject(of classes: [AnyClass]?, forKey key: String) throws -> Any? {
14041408
var error: NSError? = nil
@@ -1424,6 +1428,7 @@ internal func NS_Swift_NSKeyedUnarchiver_unarchiveObjectWithData(
14241428

14251429
extension NSKeyedUnarchiver {
14261430
@available(OSX 10.11, iOS 9.0, *)
1431+
@nonobjc
14271432
public class func unarchiveTopLevelObjectWithData(_ data: NSData) throws -> AnyObject? {
14281433
var error: NSError?
14291434
let result = NS_Swift_NSKeyedUnarchiver_unarchiveObjectWithData(self, data as AnyObject, &error)

0 commit comments

Comments
 (0)