File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ its initializer should have extra constraints.
12
12
13
13
## Motivation
14
14
15
- At the moment ` AnyCollection ` does not delegate calls to ` SequenceType ` protocol
15
+ At the moment ` AnySequence ` does not delegate calls to ` SequenceType ` protocol
16
16
methods to the underlying base sequence, which results in dynamic downcasts in
17
17
places where this behavior is needed (see default implementations of
18
18
` SequenceType.dropFirst ` or ` SequenceType.prefix ` ). Besides, and this is even
@@ -76,7 +76,10 @@ public struct AnySequence<Element> : SequenceType {
76
76
77
77
These constraints, in fact, should be applied to ` SequenceType ` protocol itself
78
78
(although, that is not currently possible), as we expect every ` SequenceType `
79
- implementation to satisfy them already.
79
+ implementation to satisfy them already. Worth mentioning that technically
80
+ ` S.SubSequence.SubSequence == S.SubSequence ` does not have to be this strict,
81
+ as any sequence with the same element type would do, but that is currently not
82
+ representable.
80
83
81
84
## Impact on existing code
82
85
You can’t perform that action at this time.
0 commit comments