File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ extension Array : _ObjectiveCBridgeable {
414
414
415
415
@_semantics ( " convertToObjectiveC " )
416
416
public func _bridgeToObjectiveC( ) -> NSArray {
417
- return unsafeBitCast ( self . _buffer . _asCocoaArray ( ) , to: NSArray . self)
417
+ return unsafeBitCast ( self . _bridgeToObjectiveCImpl ( ) , to: NSArray . self)
418
418
}
419
419
420
420
public static func _forceBridgeFromObjectiveC(
Original file line number Diff line number Diff line change @@ -2074,6 +2074,11 @@ public func != <Element : Equatable>(
2074
2074
2075
2075
#if _runtime(_ObjC)
2076
2076
extension Array {
2077
+ public // @SPI(Foundation)
2078
+ func _bridgeToObjectiveCImpl( ) -> AnyObject {
2079
+ return _buffer. _asCocoaArray ( )
2080
+ }
2081
+
2077
2082
/// Tries to downcast the source `NSArray` as our native buffer type.
2078
2083
/// If it succeeds, creates a new `Array` around it and returns that.
2079
2084
/// Returns `nil` otherwise.
You can’t perform that action at this time.
0 commit comments