Skip to content

Commit 1bfd433

Browse files
committed
[Foundation] Workaround for importer NS_REFINED_FOR_SWIFT failure in development environments
This is just a work-around for the underlying importer failure tracked by <rdar://problem/26921178>
1 parent 089425b commit 1bfd433

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

stdlib/public/SDK/Foundation/Foundation.swift

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,14 +1217,7 @@ extension NSCoder {
12171217

12181218
@nonobjc
12191219
public func decodeObjectOfClasses(_ classes: NSSet?, forKey key: String) -> AnyObject? {
1220-
var classesAsNSObjects: Set<NSObject>? = nil
1221-
if let theClasses = classes {
1222-
classesAsNSObjects =
1223-
Set(IteratorSequence(NSFastEnumerationIterator(theClasses)).map {
1224-
unsafeBitCast($0, to: NSObject.self)
1225-
})
1226-
}
1227-
return self.__decodeObject(ofClasses: classesAsNSObjects, forKey: key)
1220+
return NS_Swift_NSCoder_decodeObjectOfClassesForKey(self as AnyObject, classes, key as AnyObject, nil)
12281221
}
12291222

12301223
@available(OSX 10.11, iOS 9.0, *)

0 commit comments

Comments
 (0)