swift
ad8b0f33 - [Sema] Allow @_section/@_used in concrete generic context (#75222)

Commit
1 year ago
[Sema] Allow @_section/@_used in concrete generic context (#75222) Allow `@_section` and `@_used` to be used in fully constrained extensions. This aligns with the existing behavior of static properties of generic types. The following is valid: ```swift extension Array where Element == Int { static let specificConstant = 41 } ``` However, adding `@_section` or `@_used` to the above property, will result in an error diagnostic. This change updates the logic of `@_section`/`@_used` to allow their use when the generic context is fully concrete.
Author
Parents
Loading