mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: Remove _isBridgedToObjectiveC from _ObjectiveCBridgeable.
All generic bridgeable types can bridge for all their instantiations now. Removing this ferrets out some now-unnecessary traps that check for unbridgeable parameter types.
This commit is contained in:
@@ -112,13 +112,8 @@ extension _ArrayBuffer {
|
||||
|
||||
/// Convert to an NSArray.
|
||||
///
|
||||
/// - Precondition: `_isBridgedToObjectiveC(Element.self)`.
|
||||
/// O(1) if the element type is bridged verbatim, O(N) otherwise.
|
||||
/// O(1) if the element type is bridged verbatim, O(N) otherwise.
|
||||
public func _asCocoaArray() -> _NSArrayCore {
|
||||
_sanityCheck(
|
||||
_isBridgedToObjectiveC(Element.self),
|
||||
"Array element type is not bridged to Objective-C")
|
||||
|
||||
return _fastPath(_isNative) ? _native._asCocoaArray() : _nonNative
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user