Skip to content

Commit 55f439e

Browse files
committed
Update CHANGELOG.md for pack element captures
1 parent 770b60a commit 55f439e

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
@@ -5,6 +5,20 @@
55
66
## Swift 6.0
77

8+
* Closures can now appear in pack expansion expressions, which allows you to
9+
construct a parameter pack of closures where each closure captures the
10+
corresponding element of some other parameter pack. For example:
11+
12+
```swift
13+
struct Manager<each T> {
14+
let fn: (repeat () -> (each T))
15+
16+
init(_ t: repeat each T) {
17+
fn = (repeat { each t })
18+
}
19+
}
20+
```
21+
822
* [SE-0431][]:
923
You can now require a function value to carry its actor isolation
1024
dynamically in a way that can be directly read by clients:

0 commit comments

Comments
 (0)