Parsing and type checking for the definition of isolated conformances

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.
This commit is contained in:
Doug Gregor
2025-02-25 16:10:07 -08:00
parent 14dd14d1a4
commit 52c46f838a
15 changed files with 175 additions and 24 deletions

View File

@@ -34,8 +34,8 @@ enum class ProtocolConformanceFlags {
/// @retroactive conformance
Retroactive = 0x08,
/// @safe conformance
Safe = 0x10,
/// @isolated conformance
Isolated = 0x10,
// Note: whenever you add a bit here, update
// NumProtocolConformanceOptions below.