-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SE-0470] Enable isolated conformances by default #80702
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
@swift-ci please test source compatibility |
…gnatureImpl This is going to need a proper implementation in the requirement machine. For the moment, provide a slightly-less-broken implementation but leave a test case where we incorrectly accept racey code.
The IsolatedConformances feature moves to a normal, supported feature. Remove all of the experimental-feature flags on test cases and such. The InferIsolatedConformances feature moves to an upcoming feature for Swift 7. This should become an adoptable feature, adding "nonisolated" where needed.
…ol requirements as Sendable A metatype for an archetype or existential with no (non-marker) protocol requirements cannot, by definition, carry any (isolated) protocol conformances with it, so it's safe to treat such metatypes as Sendable.
…ble metatypes The code that determines whether a reference to a static method (that is not a call) assumed that metatypes were always Sendable. This is no longer the case, so update this code to go through the normal Sendable checking on the metatype.
7a94e36
to
3ed1d6c
Compare
@swift-ci please smoke test |
@swift-ci please test source compatibility |
…le metatypes The introduction of non-Sendable metatypes in Swift 6.2 (via SE-0470) will break some existing Swift 6 code. Downgrade concurrency errors involving non-Sendable metatypes to warnings until some future language mode to ease the transition.
@swift-ci please smoke test |
@swift-ci please test source compatibility |
xedin
reviewed
Apr 14, 2025
xedin
reviewed
Apr 14, 2025
…ing possibly-nonsendable metatypes Thank you, Pavel!
@swift-ci please smoke test |
@swift-ci please test source compatibility |
@swift-ci please test source compatibility Debug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The IsolatedConformances feature moves to a normal, supported feature. Remove all of the experimental-feature flags on test cases and such.
The InferIsolatedConformances feature moves to an upcoming feature for Swift 7. This should become an adoptable feature, adding "nonisolated" where needed.
There are a number of bug fixes and cleanups here to the isolated conformances code as well, including:
@Sendable
inference for references to static methods to properly check for sendability of the metatypeThis finalizes the implementation of SE-0470, tracked by rdar://146116559.