Skip to content

Commit 34e1679

Browse files
committed
SIL: make isEmpty and singleElement available for all Sequences
and not just for `CollectionLikeSequence`. To support stdlib's lazy map and filter sequences.
1 parent 65b7f57 commit 34e1679

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SwiftCompilerSources/Sources/SIL/Utilities/SequenceUtilities.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ extension FormattedLikeArray {
7171
public protocol CollectionLikeSequence : FormattedLikeArray {
7272
}
7373

74-
public extension CollectionLikeSequence {
74+
public extension Sequence {
7575
var isEmpty: Bool { !contains(where: { _ in true }) }
7676

7777
var singleElement: Element? {

0 commit comments

Comments
 (0)