Skip to content

[6.2][Concurrency] Downgrade isolated conformances to SendableMetatype protocols to a warning for implicitly @preconcurrency protocols. #83138

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

hborla
Copy link
Member

@hborla hborla commented Jul 17, 2025

  • Explanation: It is invalid to form an isolated conformance to a protocol that requires SendableMetatype. This error follows the standard @preconcurrency downgrade so that SendableMetatype annotations can be retroactively added to protocols, but that downgrade mechanism did not account for implicitly @preconcurrency protocols, including all protocols imported from Objective-C. This change adds a minor adjustment to the downgrade logic for this error message.
  • Scope: Only impacts isolated conformances to SendableMetatype-conforming protocols. Isolated conformances are a new feature in 6.2 so this does not impact any existing code.
  • Issues: rdar://155821329
  • Original PRs: [Concurrency] Downgrade isolated conformances to SendableMetatype protocols to a warning for implicitly @preconcurrency protocols. #83136
  • Risk: Low; the only effect is downgrading one error to a warning.
  • Testing: Added tests.
  • Reviewers: @DougGregor

protocols to a warning for implicitly `@preconcurrency` protocols.

(cherry picked from commit 4b50238)
@hborla hborla requested a review from a team as a code owner July 17, 2025 17:32
@hborla
Copy link
Member Author

hborla commented Jul 17, 2025

@swift-ci please test

@hborla hborla merged commit f8ca0f0 into swiftlang:release/6.2 Jul 18, 2025
5 checks passed
@hborla hborla deleted the 6.2-invalid-isolated-conformance-downgrade branch July 18, 2025 04:04
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