Skip to content

Commit 4e3f77a

Browse files
committed
Add release note for SE-0302 "Sendable and @sendable closures"
(cherry picked from commit 0adf497)
1 parent d430b3e commit 4e3f77a

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
@@ -6,6 +6,26 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
66
Swift 5.6
77
---------
88

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+
929
* References to `Self` or so-called "`Self` requirements" in the type signatures
1030
of protocol members are now correctly detected in the parent of a nested type.
1131
As a result, protocol members that fall under this overlooked case are no longer
@@ -26,7 +46,7 @@ Swift 5.6
2646
// protocol type (use a generic constraint instead).
2747
_ = p.method
2848
}
29-
```
49+
```
3050

3151
* [SE-0324][]:
3252

@@ -8753,6 +8773,7 @@ Swift 1.0
87538773
[SE-0298]: <https://github.com/apple/swift-evolution/blob/main/proposals/0298-asyncsequence.md>
87548774
[SE-0299]: <https://github.com/apple/swift-evolution/blob/main/proposals/0299-extend-generic-static-member-lookup.md>
87558775
[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>
87568777
[SE-0306]: <https://github.com/apple/swift-evolution/blob/main/proposals/0306-actors.md>
87578778
[SE-0310]: <https://github.com/apple/swift-evolution/blob/main/proposals/0310-effectful-readonly-properties.md>
87588779
[SE-0311]: <https://github.com/apple/swift-evolution/blob/main/proposals/0311-task-locals.md>

0 commit comments

Comments
 (0)