Skip to content

Conversation

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Feb 26, 2025

Allow a conformance to be "isolated", meaning that it stays in the same isolation domain as the conforming type. Only allow this for global-actor-isolated types.

When a conformance is isolated, a nonisolated requirement can be witnessed by a declaration with the same global actor isolation as the enclosing type.

Additionally, insure that isolated conformances are viral to other conformances: if a conformance depends on an isolated conformance, it might itself be isolated, and to the same global actor.

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

Allow a conformance to be "isolated", meaning that it stays in the same
isolation domain as the conforming type. Only allow this for
global-actor-isolated types.

When a conformance is isolated, a nonisolated requirement can be
witnessed by a declaration with the same global actor isolation as the
enclosing type.
When a protocol conformance somehow depends on an isolated conformance, it
must itself be isolated to the same global actor as the conformance on
which it depends.
@DougGregor DougGregor force-pushed the isolated-conformances branch from de29302 to 71e23ac Compare February 26, 2025 07:06
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test Windows

@DougGregor
Copy link
Member Author

@swift-ci please smoke test Windows

@DougGregor DougGregor merged commit 71e23ac into swiftlang:main Feb 27, 2025
2 of 3 checks passed
@DougGregor DougGregor deleted the isolated-conformances branch February 27, 2025 02:58
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