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 @@ -6,6 +6,26 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
6
6
Swift 5.6
7
7
---------
8
8
9
+ * [ SE-0302] [ ] :
10
+
11
+ Swift will now produce warnings to indicate potential data races when
12
+ non-` Sendable ` types are passed across actor or task boundaries. For
13
+ example:
14
+
15
+ ``` swift
16
+ class MyCounter {
17
+ var value = 0
18
+ }
19
+
20
+ func f () -> MyCounter {
21
+ let counter = MyCounter ()
22
+ Task {
23
+ counter.value += 1 // warning: capture of non-Sendable type 'MyCounter'
24
+ }
25
+ return counter
26
+ }
27
+ ```
28
+
9
29
* References to ` Self ` or so-called "` Self ` requirements" in the type signatures
10
30
of protocol members are now correctly detected in the parent of a nested type.
11
31
As a result, protocol members that fall under this overlooked case are no longer
@@ -26,7 +46,7 @@ Swift 5.6
26
46
// protocol type (use a generic constraint instead).
27
47
_ = p.method
28
48
}
29
- ```
49
+ ```
30
50
31
51
* [ SE-0324] [ ] :
32
52
@@ -8753,6 +8773,7 @@ Swift 1.0
8753
8773
[SE- 0298 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0298-asyncsequence.md>
8754
8774
[SE- 0299 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0299-extend-generic-static-member-lookup.md>
8755
8775
[SE- 0300 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0300-continuation.md>
8776
+ [SE- 0302 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0302-concurrent-value-and-concurrent-closures.md>
8756
8777
[SE- 0306 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0306-actors.md>
8757
8778
[SE- 0310 ]: < https: // github.com/apple/swift-evolution/blob/main/proposals/0310-effectful-readonly-properties.md>
8758
8779
[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