Skip to content

[SR-10897] extensions of @available constrained classes creates warnings #53287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
swift-ci opened this issue Jun 9, 2019 · 1 comment
Open
Assignees
Labels
compiler The Swift compiler itself improvement

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Jun 9, 2019

Previous ID SR-10897
Radar None
Original Reporter ajo (JIRA User)
Type Improvement
Additional Detail from JIRA
Votes 2
Component/s Compiler
Labels Improvement
Assignee @xymus
Priority Medium

md5: aa32c297a13cc9f973b1d1e8e3416ac7

Issue Description:

The following code results in a error on the extension:

'Asdf' is only available in iOS 13.0 or newer
@available(iOS 13.0, *) class Asdf {   }
extension Asdf { }

As there are no cases where the extension can have fewer, or a more relaxed constraint than the object, the constraints on the object itself should be propagated to extensions.

@norio-nomura
Copy link
Contributor

I hope this feature helps to avoid the bugs mentioned in this thread.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler itself improvement
Projects
None yet
Development

No branches or pull requests

2 participants