File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
swift-6-beta.docc/ReferenceManual Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -2475,19 +2475,15 @@ Swift 提供了以下 Interface Builder 特性:
2475
2475
2476
2476
### Sendable
2477
2477
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
+ 可发送函数类型是相应的不可发送函数类型的子类型。
2491
2487
2492
2488
## Switch Case Attributes
2493
2489
You can’t perform that action at this time.
0 commit comments