Skip to content

Commit 3e21fc6

Browse files
authored
Merge pull request #75751 from swiftlang/ktoso-patch-17
Changelog: add notes about SE-0442
2 parents 45e9534 + 7381bf0 commit 3e21fc6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,32 @@
33
> [!NOTE]
44
> This is in reverse chronological order, so newer entries are added to the top.
55
6+
## Swift (next)
7+
8+
* [SE-0442][]:
9+
TaskGroups can now be created without explicitly specifying their child task's result types:
10+
11+
Previously the child task type would have to be specified explicitly when creating the task group:
12+
13+
```swift
14+
await withTaskGroup(of: Int.self) { group in
15+
group.addTask { 12 }
16+
17+
return await group.next()
18+
}
19+
```
20+
21+
Now the type is inferred based on the first use of the task group within the task group's body:
22+
23+
```swift
24+
await withTaskGroup { group in
25+
group.addTask { 12 }
26+
27+
return await group.next()
28+
}
29+
```
30+
31+
632
## Swift 6.0
733

834
* Swift 6 comes with a new language mode that prevents the risk of data races
@@ -10586,6 +10612,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
1058610612
[SE-0424]: https://github.com/apple/swift-evolution/blob/main/proposals/0424-custom-isolation-checking-for-serialexecutor.md
1058710613
[SE-0428]: https://github.com/apple/swift-evolution/blob/main/proposals/0428-resolve-distributed-actor-protocols.md
1058810614
[SE-0431]: https://github.com/apple/swift-evolution/blob/main/proposals/0431-isolated-any-functions.md
10615+
[SE-0442]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0442-allow-taskgroup-childtaskresult-type-to-be-inferred.md
1058910616
[#64927]: <https://github.com/apple/swift/issues/64927>
1059010617
[#42697]: <https://github.com/apple/swift/issues/42697>
1059110618
[#42728]: <https://github.com/apple/swift/issues/42728>

0 commit comments

Comments
 (0)