Commit Graph

3 Commits

Author SHA1 Message Date
Doug Gregor
0e873e723c [Isolated conformances] Change syntax to @<global actor type> P
Instead of using the `isolated P` syntax, switch to specifying the
global actor type directly, e.g.,

   class MyClass: @MainActor MyProto { ... }

No functionality change at this point
2025-03-12 23:18:10 -07:00
Doug Gregor
52c46f838a 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.
2025-02-25 21:16:51 -08:00
Doug Gregor
d681f92932 Factor conformance attributes into their own separate structure.
We had an exploded form of conformance attributes (@unchecked,
@preconcurrency, @unsafe) at several different places in the compiler.
Pull these into a single structure so it's easier to manage and extend.

Should have done this a long time ago.
2025-02-25 11:40:38 -08:00