File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 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>
You can’t perform that action at this time.
0 commit comments