Skip to content

Commit 08c8137

Browse files
committed
[stdlib] Make _Unwrappable internal and rename func unwrap() to _unwrap()
_Unwrappable isn’t used in inlinable context.
1 parent 2863b6c commit 08c8137

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

stdlib/public/core/BridgeObjectiveC.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -649,13 +649,12 @@ public func _extractDynamicValue<T>(_ value: T) -> AnyObject?
649649
@_silgen_name("_swift_bridgeToObjectiveCUsingProtocolIfPossible")
650650
public func _bridgeToObjectiveCUsingProtocolIfPossible<T>(_ value: T) -> AnyObject?
651651

652-
@usableFromInline
653-
protocol _Unwrappable {
654-
func unwrap() -> Any?
652+
internal protocol _Unwrappable {
653+
func _unwrap() -> Any?
655654
}
656655

657656
extension Optional: _Unwrappable {
658-
func unwrap() -> Any? {
657+
internal func _unwrap() -> Any? {
659658
return self
660659
}
661660
}
@@ -706,7 +705,7 @@ public func _bridgeAnythingToObjectiveC<T>(_ x: T) -> AnyObject {
706705
}
707706

708707
if !done, let wrapper = source as? _Unwrappable {
709-
if let value = wrapper.unwrap() {
708+
if let value = wrapper._unwrap() {
710709
result = value as AnyObject
711710
} else {
712711
result = _nullPlaceholder

0 commit comments

Comments
 (0)