Skip to content

Commit 40c05b3

Browse files
authored
Merge pull request #9378 from airspeedswift/lazy-constraints
2 parents 03b3853 + b6250ee commit 40c05b3

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

stdlib/public/core/Flatten.swift.gyb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,7 @@ extension Sequence where Iterator.Element : Sequence {
133133
}
134134
}
135135

136-
extension LazySequenceProtocol
137-
where
138-
Elements.Iterator.Element == Iterator.Element,
139-
Iterator.Element : Sequence {
136+
extension LazySequenceProtocol where Iterator.Element : Sequence {
140137

141138
/// Returns a lazy sequence that concatenates the elements of this sequence of
142139
/// sequences.
@@ -418,8 +415,8 @@ extension LazyCollectionProtocol
418415
Self : ${collectionForTraversal(traversal)},
419416
Elements : ${collectionForTraversal(traversal)},
420417
% end
421-
${constraints % {'Base': 'Elements.'}},
422-
Iterator.Element == Elements.Iterator.Element {
418+
${constraints % {'Base': 'Elements.'}}
419+
{
423420
/// A concatenation of the elements of `self`.
424421
public func joined() -> LazyCollection<${Collection}<Elements>> {
425422
return ${Collection}(elements).lazy

stdlib/public/core/LazySequence.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public protocol LazySequenceProtocol : Sequence {
133133
///
134134
/// - See also: `elements`
135135
associatedtype Elements : Sequence = Self
136+
where Elements.Iterator.Element == Iterator.Element
136137

137138
/// A sequence containing the same elements as this one, possibly with
138139
/// a simpler type.

0 commit comments

Comments
 (0)