Skip to content

Commit 2794ea5

Browse files
authored
[SE-0302] Clarify inference for non-public structs and enums and frozen public structs and enums (#1303)
* Clarify inference for non-public structs and enums and frozen public structs and enums * Also account for @usableFromInline.
1 parent 69cfc17 commit 2794ea5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proposals/0302-concurrent-value-and-concurrent-closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ extension MySneakyNSPerson: @unchecked Sendable { }
264264
#### Implicit struct/enum conformance to `Sendable`
265265

266266
Many structs and enums satisfy the requirements of `Sendable`, and having to explicitly write out "`: Sendable`" for every such type can feel like boilerplate.
267-
For non-public, non-frozen structs and enums, the `Sendable` conformance is implicitly provided when conformance checking (described in the previous section) succeeds:
267+
For non-public structs and enums that are also not `@usableFromInline`, and for frozen public structs and enums, the `Sendable` conformance is implicitly provided when conformance checking (described in the previous section) succeeds:
268268

269269
```swift
270270
struct MyPerson2 { // Implicitly conforms to Sendable!

0 commit comments

Comments
 (0)