Skip to content

Commit 63a4107

Browse files
committed
[stdlib] Fix type inference issue for BidirectionalCollection
This resolves the issue described in SR-1922, where conformance to a bidirectional collection gives errors when implemented using only the minimal protocol requirements.
1 parent 0f66af4 commit 63a4107

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/BidirectionalCollection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ extension BidirectionalIndexable {
167167
/// Supply the default "slicing" `subscript` for `BidirectionalCollection`
168168
/// models that accept the default associated `SubSequence`,
169169
/// `BidirectionalSlice<Self>`.
170-
extension BidirectionalIndexable where SubSequence == BidirectionalSlice<Self> {
170+
extension BidirectionalCollection where SubSequence == BidirectionalSlice<Self> {
171171
public subscript(bounds: Range<Index>) -> BidirectionalSlice<Self> {
172172
_failEarlyRangeCheck(bounds, bounds: startIndex..<endIndex)
173173
return BidirectionalSlice(base: self, bounds: bounds)

0 commit comments

Comments
 (0)