Skip to content

Commit b28df6c

Browse files
authored
Merge pull request #28577 from natecook1000/lazy-prefix-note
Update CHANGELOG for SR-11841 fix
2 parents 59fe43a + 86053e2 commit b28df6c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@ CHANGELOG
2626
Swift 5.2
2727
---------
2828

29+
* [SR-11841][]:
30+
31+
When chaining calls to `filter(_:)` on a lazy sequence or collection, the
32+
filtering predicates will now be called in the same order as eager filters.
33+
34+
```swift
35+
let evens = (1...10).lazy
36+
.filter { $0.isMultiple(of: 2) }
37+
.filter { print($0); return true }
38+
_ = evens.count
39+
// Prints 2, 4, 6, 8, and 10 on separate lines
40+
```
41+
42+
Previously, the predicates were called in reverse order.
43+
2944
* [SR-2790][]:
3045

3146
The compiler will now emit a warning when attempting to pass a temporary
@@ -7874,3 +7889,4 @@ Swift 1.0
78747889
[SR-9827]: <https://bugs.swift.org/browse/SR-9827>
78757890
[SR-11298]: <https://bugs.swift.org/browse/SR-11298>
78767891
[SR-11429]: <https://bugs.swift.org/browse/SR-11429>
7892+
[SR-11841]: <https://bugs.swift.org/browse/SR-11841>

0 commit comments

Comments
 (0)