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 @@ -501,7 +501,7 @@ extension Array : _ObjectiveCBridgeable {
501501
502502 @_semantics ( " convertToObjectiveC " )
503503 public func _bridgeToObjectiveC( ) -> NSArray {
504- return unsafeBitCast ( self . _buffer . _asCocoaArray ( ) as AnyObject , to: NSArray . self)
504+ return unsafeBitCast ( self . _bridgeToObjectiveCImpl ( ) , to: NSArray . self)
505505 }
506506
507507 public static func _forceBridgeFromObjectiveC(
Original file line number Diff line number Diff line change @@ -2091,6 +2091,11 @@ public func != <Element : Equatable>(
20912091
20922092#if _runtime(_ObjC)
20932093extension Array {
2094+ public // @SPI(Foundation)
2095+ func _bridgeToObjectiveCImpl( ) -> AnyObject {
2096+ return _buffer. _asCocoaArray ( )
2097+ }
2098+
20942099 /// Tries to downcast the source `NSArray` as our native buffer type.
20952100 /// If it succeeds, creates a new `Array` around it and returns that.
20962101 /// Returns `nil` otherwise.
You can’t perform that action at this time.
0 commit comments