@@ -40,8 +40,8 @@ public struct CollectionMisuseResiliencyChecks {
40
40
}
41
41
42
42
% for inc, protocol , direction, end in (
43
- % ( 'inc', '_Indexable ', 'after', 'end') ,
44
- % ( 'dec', '_BidirectionalIndexable ', 'before', 'start') ) :
43
+ % ( 'inc', 'Collection ', 'after', 'end') ,
44
+ % ( 'dec', 'BidirectionalCollection ', 'before', 'start') ) :
45
45
46
46
/// Test that the elements of `instances` satisfy
47
47
/// ${'some of ' if inc == 'dec' else ''}the semantic
@@ -88,7 +88,7 @@ internal func _checkIncrementalAdvance<Instances, BaseCollection>(
88
88
${ TRACE}
89
89
) where
90
90
Instances : Collection ,
91
- BaseCollection : _Indexable ,
91
+ BaseCollection : Collection ,
92
92
Instances. Iterator. Element == BaseCollection . Index {
93
93
for i in instances {
94
94
let d : BaseCollection . IndexDistance = sign > 0 ?
@@ -122,7 +122,7 @@ public func checkForwardIndex<Instances, BaseCollection>(
122
122
endIndex: Instances . Iterator . Element , ${ TRACE}
123
123
) where
124
124
Instances : Collection ,
125
- BaseCollection : _Indexable ,
125
+ BaseCollection : Collection ,
126
126
Instances. Iterator. Element == BaseCollection . Index {
127
127
128
128
checkIncrementable ( instances, of: baseCollection,
@@ -149,7 +149,7 @@ public func checkBidirectionalIndex<Instances, BaseCollection>(
149
149
${ TRACE}
150
150
) where
151
151
Instances: Collection ,
152
- BaseCollection : _BidirectionalIndexable ,
152
+ BaseCollection : BidirectionalCollection ,
153
153
Instances. Iterator. Element == BaseCollection . Index {
154
154
155
155
checkForwardIndex ( instances, of: baseCollection,
@@ -185,7 +185,7 @@ public func checkRandomAccessIndex<Instances, Distances, BaseCollection>(
185
185
) where
186
186
Instances : Collection ,
187
187
Distances : Collection ,
188
- BaseCollection : _RandomAccessIndexable ,
188
+ BaseCollection : RandomAccessCollection ,
189
189
Instances. Iterator. Element == BaseCollection . Index ,
190
190
Distances. Iterator. Element == BaseCollection . IndexDistance {
191
191
@@ -214,7 +214,7 @@ public func checkAdvancesAndDistances<Instances, Distances, BaseCollection>(
214
214
) where
215
215
Instances : Collection ,
216
216
Distances : Collection ,
217
- BaseCollection : _Indexable ,
217
+ BaseCollection : Collection ,
218
218
Instances. Iterator. Element == BaseCollection . Index ,
219
219
Distances. Iterator. Element == BaseCollection . IndexDistance {
220
220
0 commit comments