[Distributed] Move property synthesis to DerivedConformanceDistributedActor

This commit is contained in:
Konrad `ktoso` Malawski
2021-08-25 21:22:29 +09:00
parent 0a0926ba7a
commit 90d8816dee
8 changed files with 147 additions and 95 deletions

View File

@@ -6,4 +6,36 @@ import _Distributed
@available(SwiftStdlib 5.5, *)
distributed actor DA {
}
@available(SwiftStdlib 5.5, *)
distributed actor First {
distributed func one(second: Second) async throws {
try await second.two(first: self, second: second)
}
}
@available(SwiftStdlib 5.5, *)
distributed actor Second {
distributed func two(first: First, second: Second) async {
try! await first.one(second: self)
}
}
// ==== ------------------------------------------------------------------------
@available(SwiftStdlib 5.5, *)
extension First {
@_dynamicReplacement (for :_remote_one(second:))
nonisolated func _impl_one(second: Second) async throws {
fatalError()
}
}
@available(SwiftStdlib 5.5, *)
extension Second {
@_dynamicReplacement (for :_remote_two(first:second:))
nonisolated func _impl_two(first: First, second: Second) async throws {
fatalError()
}
}