Skip to content
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

[SR-11425] Add fix-it to extend single existing @available/#available annotation with additionally needed #53826

Open
swift-ci opened this issue Sep 6, 2019 · 1 comment
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation improvement

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Sep 6, 2019

Previous ID SR-11425
Radar None
Original Reporter hannesoid (JIRA User)
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI
Assignee None
Priority Medium

md5: 7569f7cf8dbbd8184b0163aa473be764

Issue Description:

Scenario:
You already have an "if #available(iOS 12.0, *) {" clause for iOS, and you compile for mac, and it shows that it needs macOS 14.4.
The fixit "Add 'if #available' version check" should add the new requirement to the existing check "if #available(iOS 12.0, OSX 14.4,*) {" instead of wrapping another if. At least when it is just one line that is already wrapped with a #available.

The "Add @available attribute to enclosing initializer/struct" should extend the existing @available annotation instead of adding another one, preferring @available(iOS 11.2, OSX 10.13.2, *) over @available(iOS 11.2, *)\n@available(OSX 10.13.2, *)

Related SR-11424

@belkadan
Copy link
Contributor

belkadan commented Sep 6, 2019

CodaFi (JIRA User), think this would be easy enough for a Starter Bug?

@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 in itself diagnostics QoI Bug: Diagnostics Quality of Implementation improvement
Projects
None yet
Development

No branches or pull requests

2 participants