@@ -370,10 +370,7 @@ public func expect${Mutable}CollectionType<X : ${Mutable}Collection>(
370
370
X . SubSequence. Index == X . Index,
371
371
// X.SubSequence.Indices == X.Indices, // FIXME(ABI)#3 (Recursive Protocol Constraints): can't have this constraint now.
372
372
X . SubSequence. SubSequence == X . SubSequence,
373
- X . Indices : Collection,
374
- X . Indices. Iterator. Element == X . Index,
375
- X . Indices. Index == X . Index,
376
- X . Indices. SubSequence == X . Indices { }
373
+ X . Indices : Collection { }
377
374
% end
378
375
379
376
/// A slice is a `Collection` that when sliced returns an instance of
@@ -420,10 +417,7 @@ public func expectCollectionAssociatedTypes<X : Collection>(
420
417
X. SubSequence. Index == X . Index ,
421
418
// X.SubSequence.Indices == X.Indices, // FIXME(ABI)#7 (Recursive Protocol Constraints): can't have this constraint now.
422
419
X. SubSequence. SubSequence == X . SubSequence ,
423
- X. Indices : Collection ,
424
- X. Indices. Iterator. Element == X . Index ,
425
- X. Indices. Index == X . Index ,
426
- X. Indices. SubSequence == X . Indices { }
420
+ X. Indices : Collection { }
427
421
428
422
/// Check that all associated types of a `BidirectionalCollection` are what we
429
423
/// expect them to be.
@@ -443,10 +437,7 @@ public func expectBidirectionalCollectionAssociatedTypes<X : BidirectionalCollec
443
437
X. SubSequence. Index == X . Index ,
444
438
// X.SubSequence.Indices == X.Indices, // FIXME(ABI)#9 (Recursive Protocol Constraints): can't have this constraint now.
445
439
X. SubSequence. SubSequence == X . SubSequence ,
446
- X. Indices : BidirectionalCollection ,
447
- X. Indices. Iterator. Element == X . Index ,
448
- X. Indices. Index == X . Index ,
449
- X. Indices. SubSequence == X . Indices { }
440
+ X. Indices : BidirectionalCollection { }
450
441
451
442
/// Check that all associated types of a `RandomAccessCollection` are what we
452
443
/// expect them to be.
@@ -466,10 +457,7 @@ public func expectRandomAccessCollectionAssociatedTypes<X : RandomAccessCollecti
466
457
X. SubSequence. Index == X . Index ,
467
458
// X.SubSequence.Indices == X.Indices, // FIXME(ABI)#11 (Recursive Protocol Constraints): can't have this constraint now.
468
459
X. SubSequence. SubSequence == X . SubSequence ,
469
- X. Indices : RandomAccessCollection ,
470
- X. Indices. Iterator. Element == X . Index ,
471
- X. Indices. Index == X . Index ,
472
- X. Indices. SubSequence == X . Indices { }
460
+ X. Indices : RandomAccessCollection { }
473
461
474
462
public struct AssertionResult : CustomStringConvertible {
475
463
init ( isPass: Bool ) {
@@ -2000,10 +1988,7 @@ public func checkEquatable<Instances : Collection>(
2000
1988
allowBrokenTransitivity: Bool = false ,
2001
1989
${ TRACE}
2002
1990
) where
2003
- Instances. Iterator. Element : Equatable ,
2004
- // FIXME(ABI)#89 (Associated Types with where clauses): these constraints should be applied to
2005
- // associated types of Collection.
2006
- Instances. Indices. Iterator. Element == Instances . Index
1991
+ Instances. Iterator. Element : Equatable
2007
1992
{
2008
1993
let indices = Array ( instances. indices)
2009
1994
_checkEquatableImpl (
@@ -2096,10 +2081,7 @@ public func checkHashable<Instances : Collection>(
2096
2081
allowBrokenTransitivity: Bool = false ,
2097
2082
${ TRACE}
2098
2083
) where
2099
- Instances. Iterator. Element : Hashable ,
2100
- // FIXME(ABI)#90 (Associated Types with where clauses): these constraints should be applied to
2101
- // associated types of Collection.
2102
- Instances. Indices. Iterator. Element == Instances . Index {
2084
+ Instances. Iterator. Element : Hashable {
2103
2085
2104
2086
checkEquatable (
2105
2087
instances,
@@ -2191,10 +2173,7 @@ public func checkComparable<Instances : Collection>(
2191
2173
oracle: ( Instances . Index , Instances . Index ) -> ExpectedComparisonResult ,
2192
2174
${ TRACE}
2193
2175
) where
2194
- Instances. Iterator. Element : Comparable ,
2195
- // FIXME(ABI)#91 (Associated Types with where clauses): these constraints should be applied to
2196
- // associated types of Collection.
2197
- Instances. Indices. Iterator. Element == Instances . Index {
2176
+ Instances. Iterator. Element : Comparable {
2198
2177
2199
2178
// Also checks that equality is consistent with comparison and that
2200
2179
// the oracle obeys the equality laws
0 commit comments