Skip to content

Commit 66e753d

Browse files
committed
wip: Sendable
1 parent 4807119 commit 66e753d

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

swift-6-beta.docc/ReferenceManual/Attributes.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2475,19 +2475,15 @@ Swift 提供了以下 Interface Builder 特性:
24752475

24762476
### Sendable
24772477

2478-
Apply this attribute to the type of a function
2479-
to indicate that the function or closure is sendable.
2480-
Applying this attribute to a function type
2481-
has the same meaning as conforming a non–function type
2482-
to the [`Sendable`](https://developer.apple.com/documentation/swift/sendable) protocol.
2483-
2484-
This attribute is inferred on functions and closures
2485-
if the function or closure is used in a context
2486-
that expects a sendable value,
2487-
and the function or closure satisfies the requirements to be sendable.
2488-
2489-
A sendable function type
2490-
is a subtype of the corresponding nonsendable function type.
2478+
将此特性应用于函数的类型,
2479+
以指示该函数或闭包是可发送的。
2480+
将此特性应用于函数类型的含义与将非函数类型符合 [`Sendable`](https://developer.apple.com/documentation/swift/sendable) 协议相同。
2481+
2482+
如果函数或闭包在期望 sendable 值的上下文中使用,
2483+
并且函数或闭包满足 sendable 的要求,
2484+
那么该特性性会被推断到这些函数和闭包上。
2485+
2486+
可发送函数类型是相应的不可发送函数类型的子类型。
24912487

24922488
## Switch Case Attributes
24932489

0 commit comments

Comments
 (0)