[5.8] Sema: Lift restriction requiring decls with @_backDeploy
to have explicit availability
#62895
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry pick of #62876
Swift Evolution has concluded that it is inappropriate to require decls with
@_backDeploy
to also have explicit availability. Lift the restriction and assume declarations with no explicit availability are back deployed as far as possible.Lifting a simultaneous attribute restriction sounds like it should be an easy task, but that was not the case here. The diagnostics for availability conflicts with the back deployment
before:
version were greatly simplified by the assumption that an explicit@available
attribute would be present. With the removal of the restriction the implementation of the diagnostics had to be enhanced to look for both inherited availability and unavailability.Additionally, this PR fixes a bug that would have caused the wrong
@_backDeploy
attribute to be used when attributes for bothiOS
andmacCatalyst
are present.Resolves rdar://103880356