[SR-11425] Add fix-it to extend single existing @available/#available annotation with additionally needed #53826
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
improvement
Additional Detail from JIRA
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
The text was updated successfully, but these errors were encountered: