Skip to content

Commit 5eebd08

Browse files
committed
[StdlibUnittest] Remove a number of extraneous same-type constraints. NFC
1 parent a926bea commit 5eebd08

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift.gyb

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,7 @@ public func checkCollection<${genericParam}, C : Collection>(
258258
resiliencyChecks: CollectionMisuseResiliencyChecks = .all,
259259
sameValue: (${Element}, ${Element}) -> Bool
260260
) where C.Iterator.Element == ${Element},
261-
// FIXME(ABI) (Associated Types with where clauses): these constraints should be applied to
262-
// associated types of Collection.
263-
C.Indices.Iterator.Element == C.Index,
264-
C.SubSequence : Collection,
265-
C.SubSequence.Iterator.Element == ${Element},
266-
C.SubSequence.Indices.Iterator.Element == C.Index,
267-
C.SubSequence.Index == C.Index {
261+
C.SubSequence : Collection {
268262

269263
checkForwardCollection(expected, collection, message(),
270264
stackTrace: stackTrace, showFrame: showFrame, file: file, line: line,
@@ -284,11 +278,7 @@ public func check${Traversal}Collection<
284278
resiliencyChecks: CollectionMisuseResiliencyChecks = .all
285279
) where
286280
C.Iterator.Element == ${Element},
287-
C.Indices.Iterator.Element == C.Index,
288281
C.SubSequence : ${TraversalCollection},
289-
C.SubSequence.Iterator.Element == ${Element},
290-
C.SubSequence.Indices.Iterator.Element == C.Index,
291-
C.SubSequence.Index == C.Index,
292282
${Element} : Equatable {
293283

294284
check${Traversal}Collection(
@@ -309,13 +299,7 @@ public func check${Traversal}Collection<
309299
sameValue: (${Element}, ${Element}) -> Bool
310300
) where
311301
C.Iterator.Element == ${Element},
312-
// FIXME(ABI) (Associated Types with where clauses): these constraints should be applied to
313-
// associated types of Collection.
314-
C.Indices.Iterator.Element == C.Index,
315-
C.SubSequence : ${TraversalCollection},
316-
C.SubSequence.Iterator.Element == ${Element},
317-
C.SubSequence.Index == C.Index,
318-
C.SubSequence.Indices.Iterator.Element == C.Index {
302+
C.SubSequence : ${TraversalCollection} {
319303

320304
checkOneLevelOf${Traversal}Collection(expected, collection, ${trace},
321305
resiliencyChecks: resiliencyChecks, sameValue: sameValue)

0 commit comments

Comments
 (0)