Skip to content

Sema: Relax diagnosis of implied marker protocol conformances with mismatched availability #82308

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

Conversation

slavapestov
Copy link
Contributor

This logic was introduced in #75135. The intent was to prevent an implied conformance from overriding an existing unavailable one, for example in the case of Sendable. Let's relax this check a bit to only diagnose if the mismatch is in the unconditional availability, and not OS version.

Also, I added some more detailed tests, which seemed to uncover an existing soundness hole; see the FIXME in test/Sema/conformance_availability_implied_multifile.swift.

Fixes rdar://142873265.

…smatched availability

This logic was introduced in swiftlang#75135.
The intent was to prevent an implied conformance from overriding an
existing unavailable one, for example in the case of Sendable. Let's
relax this check a bit to only diagnose if the mismatch is in the
unconditional availability, and not OS version.

Fixes rdar://142873265.
@slavapestov slavapestov requested review from hborla and xedin as code owners June 17, 2025 18:28
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov merged commit fcd94f1 into swiftlang:main Jun 18, 2025
4 of 5 checks passed
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