[Isolated conformances] Allow conformance isolation to differ from the type's

With the move to explicitly specifying the global actor for an isolated
conformance, we can now have conformances whose isolation differs from
that of the type, including having actors with global-actor-isolated
conformances. Introduce this generalization to match the proposal, and
update/add tests accordingly.
This commit is contained in:
Doug Gregor
2025-03-12 17:43:16 -07:00
parent 4f2476116d
commit 3837661b84
8 changed files with 131 additions and 66 deletions

View File

@@ -10,7 +10,7 @@ public protocol MyProtocol {
@MainActor
public class MyClass { }
// CHECK: extension isolated_conformance.MyClass : @MainActor isolated_conformance.MyProtocol {
// CHECK: extension isolated_conformance.MyClass : @{{.*}}MainActor isolated_conformance.MyProtocol {
extension MyClass: @MainActor MyProtocol {
@MainActor public func f() { }
}