mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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() { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user