Skip to content

Parsing and type checking for the definition of isolated conformances #79624

Merged
DougGregor merged 2 commits into
swiftlang:mainfrom
DougGregor:isolated-conformances
Feb 27, 2025
Merged

Parsing and type checking for the definition of isolated conformances #79624
DougGregor merged 2 commits into
swiftlang:mainfrom
DougGregor:isolated-conformances

Conversation

@DougGregor

@DougGregor DougGregor commented Feb 26, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Member Author

@swift-ci please smoke test

@DougGregor

Copy link
Copy Markdown
Member Author

@swift-ci please smoke test Windows

@DougGregor

Copy link
Copy Markdown
Member Author

@swift-ci please smoke test Windows

@DougGregor DougGregor merged commit 71e23ac into swiftlang:main Feb 27, 2025
@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