We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49c3a1c commit b0b8735Copy full SHA for b0b8735
swift-6-beta.docc/ReferenceManual/Declarations.md
@@ -2194,14 +2194,9 @@ extension <#type name#>: <#adopted protocols#> where <#requirements#> {
2194
2195
扩展声明不能为现有类添加类继承,因此您只能在*类型名称*和冒号后指定协议列表。
2196
2197
-### Conditional Conformance
2198
-
2199
-You can extend a generic type
2200
-to conditionally conform to a protocol,
2201
-so that instances of the type conform to the protocol
2202
-only when certain requirements are met.
2203
-You add conditional conformance to a protocol
2204
-by including *requirements* in an extension declaration.
+### 条件遵循
+
+您可以扩展一个泛型类型以有条件地遵循一个协议,从而使该类型的实例仅在满足某些要求时遵循该协议。您通过在扩展声明中包含*要求*来添加对协议的条件遵循。
2205
2206
#### Overridden Requirements Aren't Used in Some Generic Contexts
2207
0 commit comments