Skip to content

Commit 938fc1a

Browse files
committed
Remove references to _ObjectiveCBridgeable
1 parent 6290554 commit 938fc1a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: Foundation/IndexPath.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public struct IndexPath : ReferenceConvertible, Equatable, Hashable, MutableColl
136136
// This is temporary
137137
let me = self.makeReference()
138138
let other = other.makeReference()
139-
return me.compare(other as IndexPath)
139+
return me.compare(IndexPath._unconditionallyBridgeFromObjectiveC(other))
140140
}
141141

142142
public var hashValue: Int {
@@ -214,7 +214,7 @@ extension IndexPath : CustomStringConvertible, CustomDebugStringConvertible, Cus
214214
}
215215
}
216216

217-
extension IndexPath : _ObjectiveCBridgeable {
217+
extension IndexPath {
218218
public static func _getObjectiveCType() -> Any.Type {
219219
return NSIndexPath.self
220220
}
@@ -242,6 +242,6 @@ extension NSIndexPath : _HasCustomAnyHashableRepresentation {
242242
// Must be @nonobjc to avoid infinite recursion during bridging.
243243
@nonobjc
244244
public func _toCustomAnyHashable() -> AnyHashable? {
245-
return AnyHashable(self as IndexPath)
245+
return AnyHashable(IndexPath._unconditionallyBridgeFromObjectiveC(self))
246246
}
247247
}

Diff for: Foundation/IndexSet.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ private func _toNSRange(_ r : Range<IndexSet.Element>) -> NSRange {
865865
return NSMakeRange(r.lowerBound, r.upperBound - r.lowerBound)
866866
}
867867

868-
extension IndexSet : _ObjectiveCBridgeable {
868+
extension IndexSet {
869869
public static func _getObjectiveCType() -> Any.Type {
870870
return NSIndexSet.self
871871
}
@@ -894,7 +894,7 @@ extension NSIndexSet : _HasCustomAnyHashableRepresentation {
894894
// Must be @nonobjc to avoid infinite recursion during bridging.
895895
@nonobjc
896896
public func _toCustomAnyHashable() -> AnyHashable? {
897-
return AnyHashable(self as IndexSet)
897+
return AnyHashable(IndexSet._unconditionallyBridgeFromObjectiveC(self))
898898
}
899899
}
900900

0 commit comments

Comments
 (0)