Skip to content

Commit 0adf497

Browse files
committed
Add release note for SE-0302 "Sendable and @sendable closures"
1 parent 7149702 commit 0adf497

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
1919
Swift 5.6
2020
---------
2121

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+
2242
* References to `Self` or so-called "`Self` requirements" in the type signatures
2343
of protocol members are now correctly detected in the parent of a nested type.
2444
As a result, protocol members that fall under this overlooked case are no longer
@@ -39,7 +59,7 @@ Swift 5.6
3959
// protocol type (use a generic constraint instead).
4060
_ = p.method
4161
}
42-
```
62+
```
4363

4464
* [SE-0324][]:
4565

@@ -8766,6 +8786,7 @@ Swift 1.0
87668786
[SE-0298]: <https://github.com/apple/swift-evolution/blob/main/proposals/0298-asyncsequence.md>
87678787
[SE-0299]: <https://github.com/apple/swift-evolution/blob/main/proposals/0299-extend-generic-static-member-lookup.md>
87688788
[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>
87698790
[SE-0306]: <https://github.com/apple/swift-evolution/blob/main/proposals/0306-actors.md>
87708791
[SE-0310]: <https://github.com/apple/swift-evolution/blob/main/proposals/0310-effectful-readonly-properties.md>
87718792
[SE-0311]: <https://github.com/apple/swift-evolution/blob/main/proposals/0311-task-locals.md>

0 commit comments

Comments
 (0)