Skip to content

Commit fb79ad2

Browse files
committed
Restore ClosedRange.Index: Hashable conformance
1 parent 55b7230 commit fb79ad2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

stdlib/public/core/ClosedRange.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ extension ClosedRange.Index : Comparable {
167167
}
168168
}
169169

170-
/* FIXME: compiler crash
171-
extension ClosedRange.Index: Hashable where Bound: Hashable {
170+
extension ClosedRange.Index: Hashable
171+
where Bound: Strideable, Bound.Stride: SignedInteger, Bound: Hashable {
172172
public var hashValue: Int {
173173
switch self {
174174
case .inRange(let value):
@@ -178,7 +178,6 @@ extension ClosedRange.Index: Hashable where Bound: Hashable {
178178
}
179179
}
180180
}
181-
*/
182181

183182
// FIXME: this should only be conformance to RandomAccessCollection but
184183
// the compiler balks without all 3

0 commit comments

Comments
 (0)