Skip to content

Commit c541dbe

Browse files
authored
Merge pull request swiftlang#74065 from slavapestov/update-changelog
Update CHANGELOG.md for pack element captures
2 parents 0aa0687 + 0eaa985 commit c541dbe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ And the module structure to support such applications looks like this:
7575
checking, and now even an actor which is "on a queue which is targeting
7676
another specific queue" can be properly detected using these APIs.
7777

78+
* Closures can now appear in pack expansion expressions, which allows you to
79+
construct a parameter pack of closures where each closure captures the
80+
corresponding element of some other parameter pack. For example:
81+
82+
```swift
83+
struct Manager<each T> {
84+
let fn: (repeat () -> (each T))
85+
86+
init(_ t: repeat each T) {
87+
fn = (repeat { each t })
88+
}
89+
}
90+
```
91+
7892
* [SE-0431][]:
7993
You can now require a function value to carry its actor isolation
8094
dynamically in a way that can be directly read by clients:

0 commit comments

Comments
 (0)