Skip to content

Commit 90baa32

Browse files
Merge pull request #1423 from airspeedswift/one-two-three-ah-ha-ha
Restore Data.Indices to be a CountableRange
2 parents d0bb1af + e0e2137 commit 90baa32

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Foundation/Data.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,8 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
10051005
public typealias Base64DecodingOptions = NSData.Base64DecodingOptions
10061006

10071007
public typealias Index = Int
1008-
public typealias Indices = Range<Int>
1008+
// FIXME: switch back to Range once swift 5.0 branch has PR #13342
1009+
public typealias Indices = CountableRange<Int>
10091010

10101011
@_versioned internal var _backing : _DataStorage
10111012
@_versioned internal var _sliceRange: Range<Index>
@@ -1746,7 +1747,7 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
17461747
return i + 1
17471748
}
17481749

1749-
public var indices: Range<Int> {
1750+
public var indices: CountableRange<Int> {
17501751
@inline(__always)
17511752
get {
17521753
return startIndex..<endIndex

0 commit comments

Comments
 (0)