File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -disable-availability-checking %S/../Inputs/FakeDistributedActorSystems.swift
3
+ // RUN: %target-build-swift -module-name main -Xfrontend -disable-availability-checking -j2 -parse-as-library -I %t %s %S/../Inputs/FakeDistributedActorSystems.swift -o %t/a.out
4
+ // RUN: %target-codesign %t/a.out
5
+ // RUN: %target-run %t/a.out | %FileCheck %s --color
6
+
7
+ // REQUIRES: executable_test
8
+ // REQUIRES: concurrency
9
+ // REQUIRES: distributed
10
+
11
+ // rdar://76038845
12
+ // UNSUPPORTED: use_os_stdlib
13
+ // UNSUPPORTED: back_deployment_runtime
14
+
15
+ import Distributed
16
+ import FakeDistributedActorSystems
17
+
18
+ protocol Key {
19
+ static var isInteger : Bool { get }
20
+ }
21
+
22
+ distributed actor TestActor < Object> where Object: Codable & Identifiable , Object. ID: Key {
23
+ public init ( actorSystem: ActorSystem ) {
24
+ self . actorSystem = actorSystem
25
+ }
26
+
27
+ public distributed func handleObject( _ object: Object ) async throws {
28
+ print ( " \( object) " )
29
+ }
30
+ }
31
+
32
+ typealias DefaultDistributedActorSystem = FakeRoundtripActorSystem
33
+
34
+ // ==== Execute ----------------------------------------------------------------
35
+ @main struct Main {
36
+ static func main( ) async {
37
+ // CHECK: OK
38
+ print ( " OK " )
39
+ }
40
+ }
You can’t perform that action at this time.
0 commit comments