Skip to content

[6.4.x] Sema: Suggest anyAppleOS availability when appropriate in fix-its#89450

Merged
tshortli merged 2 commits into
swiftlang:release/6.4.xfrom
tshortli:if-available-any-apple-os-fix-its-6.4.x
May 28, 2026
Merged

[6.4.x] Sema: Suggest anyAppleOS availability when appropriate in fix-its#89450
tshortli merged 2 commits into
swiftlang:release/6.4.xfrom
tshortli:if-available-any-apple-os-fix-its-6.4.x

Conversation

@tshortli
Copy link
Copy Markdown
Contributor

@tshortli tshortli commented May 26, 2026

  • Explanation: When emitting fix-its that would make an unavailable declaration available, use anyAppleOS in the fix-it instead of the target platform if the unmet availability constraint is in the anyAppleOS domain.
  • Scope: Affects fix-its that are emitted when declarations
  • Issue/Radar: rdar://174558882
  • Original PR: Sema: Suggest anyAppleOS availability when appropriate in fix-its #89449
  • Risk: Low. Only affects fix-its for code that is already rejected.
  • Testing: Existing tests covered this scenario and have been updated to reflect the new expected behavior.
  • Reviewer: @nkcsgexi

@tshortli tshortli requested a review from a team as a code owner May 26, 2026 23:59
@tshortli tshortli force-pushed the if-available-any-apple-os-fix-its-6.4.x branch 2 times, most recently from 94779d8 to d6695d2 Compare May 27, 2026 04:51
@tshortli
Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@tshortli
Copy link
Copy Markdown
Contributor Author

@swift-ci please test Linux

1 similar comment
@tshortli
Copy link
Copy Markdown
Contributor Author

@swift-ci please test Linux

tshortli added 2 commits May 27, 2026 10:16
When emitting fix-its that would make an unavailable declaration available, use
`anyAppleOS` in the fix-it instead of the target platform if the unmet
availability constraint is in the `anyAppleOS` domain.

Resolves rdar://174558882.
@tshortli tshortli force-pushed the if-available-any-apple-os-fix-its-6.4.x branch from d6695d2 to 8517482 Compare May 27, 2026 17:16
@tshortli
Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@tshortli tshortli enabled auto-merge May 27, 2026 17:45
@tshortli tshortli merged commit e883a47 into swiftlang:release/6.4.x May 28, 2026
6 checks passed
@tshortli tshortli deleted the if-available-any-apple-os-fix-its-6.4.x branch May 28, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants