mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The concurrency runtime now deploys back to macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, which corresponds to the 5.1 release of the stdlib. Adjust macro usages accordingly.
23 lines
863 B
Swift
23 lines
863 B
Swift
// RUN: %target-typecheck-verify-swift -enable-experimental-distributed
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: distributed
|
|
|
|
import _Distributed
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
distributed actor Capybara { }
|
|
|
|
//@available(SwiftStdlib 5.1, *)
|
|
//protocol Wheeker: DistributedActor { }
|
|
//@available(SwiftStdlib 5.1, *)
|
|
//distributed actor GuineaPing: Wheeker { }
|
|
|
|
@available(SwiftStdlib 5.1, *)
|
|
func test(identity: AnyActorIdentity, transport: ActorTransport) async throws {
|
|
let _: Capybara = try Capybara.resolve(identity, using: transport)
|
|
|
|
// TODO: implement resolve being able to be called on a distributed actor protocol
|
|
// (yes, normally it is not allowed to call such function... so we need to
|
|
// discuss and figure out how we want to expose the resolve of a protocol)
|
|
// let c: Wheeker = try Wheeker.resolve(.init(identity), using: transport)
|
|
} |