Files
swift-mirror/test/IRGen/section_errors.swift
Dave Lee ad8b0f3397 [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.
2024-07-16 10:05:15 -07:00

2.6 KiB