Skip to content

[SE-0470] Prohibit inference of isolated conformances with nonisolated witnesses #81296

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

DougGregor
Copy link
Member

If all of the witnesses to a conformance are nonisolated, then infer that conformance as nonisolated rather than global-actor-isolated. This is only relevant when InferIsolatedConformances is enabled, and prevents that inference to help maintain source compatibility.

DougGregor added 3 commits May 5, 2025 11:08
…d witnesses

If all of the witnesses to a conformance are nonisolated, then infer that
conformance as nonisolated rather than global-actor-isolated. This is
only relevant when InferIsolatedConformances is enabled, and prevents
that inference to help maintain source compatibility.
This request was looking through to the root conformance, which could
mess with the caching bits. Sink the "is nonisolated conformance" bit
down into ProtocolConformance, and have the request for a non-root
conformance be defined in terms of the request for the root
conformance.
This assertion will trigger whenever there is a cycle with a
split-cached request. Remove the assertion.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test macOS

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor merged commit aee6a52 into swiftlang:main May 6, 2025
3 checks passed
@DougGregor DougGregor deleted the infer-nonisolated-conformances-from-witnesses branch May 6, 2025 23:08
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.

1 participant