Skip to content

[5.3][Sema] Consider inherited platform unavailability to silence diagnostics #34323

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

Merged

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Oct 15, 2020

The compiler reported a superfluous error on some uses of an unavailable type in unavailable declaration, which should be accepted. This affected only platforms like Mac Catalyst when the user declaration was marked unavailable on iOS and the unavailable type was defined in Objective-C. The fix makes the diagnostic consider the inherited platform unavailability on the user declaration to suppress the error.

@xymus xymus requested a review from a team as a code owner October 15, 2020 18:28
@xymus xymus requested review from beccadax and nkcsgexi October 15, 2020 18:28
@xymus
Copy link
Contributor Author

xymus commented Oct 15, 2020

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - df44b39

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - df44b39

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@shahmishal
Copy link
Member

@swift-ci Please test

@xymus
Copy link
Contributor Author

xymus commented Oct 15, 2020

@swift-ci Please nominate

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - df44b39

@DougGregor
Copy link
Member

@swift-ci please test macOS

@xymus
Copy link
Contributor Author

xymus commented Oct 15, 2020

The macOS failure appears to be unrelated and tracked by rdar://66842937.

@xymus xymus merged commit d78f504 into swiftlang:release/5.3-20201012 Oct 16, 2020
@xymus xymus deleted the inherit-unavailability-5.3 branch October 16, 2020 16:19
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants