File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,26 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
19
19
Swift 5.6
20
20
---------
21
21
22
+ * [ SE-0302] [ ] :
23
+
24
+ Swift will now produce warnings to indicate potential data races when
25
+ non-` Sendable ` types are passed across actor or task boundaries. For
26
+ example:
27
+
28
+ ``` swift
29
+ class MyCounter {
30
+ var value = 0
31
+ }
32
+
33
+ func f () -> MyCounter {
34
+ let counter = MyCounter ()
35
+ Task {
36
+ counter.value += 1 // warning: capture of non-Sendable type 'MyCounter'
37
+ }
38
+ return counter
39
+ }
40
+ ```
41
+
22
42
* References to ` Self ` or so-called "` Self ` requirements" in the type signatures
23
43
of protocol members are now correctly detected in the parent of a nested type.
24
44
As a result, protocol members that fall under this overlooked case are no longer
@@ -39,7 +59,7 @@ Swift 5.6
39
59
// protocol type (use a generic constraint instead).
40
60
_ = p.method
41
61
}
42
- ```
62
+ ```
43
63
44
64
* [ SE-0324] [ ] :
45
65
@@ -8766,6 +8786,7 @@ Swift 1.0
8766
8786
[SE- 0298 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0298-asyncsequence.md>
8767
8787
[SE- 0299 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0299-extend-generic-static-member-lookup.md>
8768
8788
[SE- 0300 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0300-continuation.md>
8789
+ [SE- 0302 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0302-concurrent-value-and-concurrent-closures.md>
8769
8790
[SE- 0306 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0306-actors.md>
8770
8791
[SE- 0310 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0310-effectful-readonly-properties.md>
8771
8792
[SE- 0311 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0311-task-locals.md>
You can’t perform that action at this time.
0 commit comments