Files
swift-mirror/test/Distributed/distributed_actor_resolve.swift
Karoy Lorentey 47956908b7 [Concurrency] SwiftStdlib 5.5 ⟹ SwiftStdlib 5.1 (usages)
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.
2021-10-28 14:36:36 -07:00

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)
}