@@ -2387,23 +2387,18 @@ struct ArrayBuilder {
2387
2387
2388
2388
### warn_unqualified_access
2389
2389
2390
- Apply this attribute to a
2391
- top-level function, instance method, or class or static method
2392
- to trigger warnings when that function or method is used
2393
- without a preceding qualifier,
2394
- such as a module name, type name, or instance variable or constant.
2395
- Use this attribute to help discourage ambiguity between functions
2396
- with the same name that are accessible from the same scope.
2397
-
2398
- For example,
2399
- the Swift standard library includes both a top-level
2390
+ 将此特性应用于顶级函数、实例方法、类方法或静态方法,
2391
+ 以在使用该函数或方法时触发警告,
2392
+ 前提是没有前置限定符,
2393
+ 例如模块名称、类型名称或实例变量或常量。
2394
+ 使用此特性可以帮助减少在同一作用域中可访问的同名函数之间的歧义。
2395
+
2396
+ 例如,Swift 标准库包括一个顶级函数
2400
2397
[ ` min(_:_:) ` ] ( https://developer.apple.com/documentation/swift/1538339-min/ )
2401
- function and a
2402
- [ ` min() ` ] ( https://developer.apple.com/documentation/swift/sequence/1641174-min )
2403
- method for sequences with comparable elements.
2404
- The sequence method is declared with the ` warn_unqualified_access ` attribute
2405
- to help reduce confusion
2406
- when attempting to use one or the other from within a ` Sequence ` extension.
2398
+ 和一个用于具有可比较元素的序列的
2399
+ [ ` min() ` ] ( https://developer.apple.com/documentation/swift/sequence/1641174-min ) 方法。
2400
+ 序列方法使用 ` warn_unqualified_access ` 特性声明,
2401
+ 以帮助减少在 ` Sequence ` 扩展中尝试使用其中一个或另一个时的混淆。
2407
2402
2408
2403
### Declaration Attributes Used by Interface Builder
2409
2404
0 commit comments