1
- // RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-distributed -parse-as-library) | %FileCheck %s
1
+ // RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-distributed -parse-as-library -Xfrontend -disable-availability-checking ) | %FileCheck %s
2
2
3
3
// REQUIRES: executable_test
4
4
// REQUIRES: concurrency
12
12
13
13
import _Distributed
14
14
15
- @available ( SwiftStdlib 5 . 5 , * )
16
15
distributed actor LocalWorker {
17
16
init ( transport: ActorTransport ) {
18
17
defer { transport. actorReady ( self ) } // FIXME(distributed): rdar://81783599 this should be injected automatically
@@ -27,7 +26,6 @@ distributed actor LocalWorker {
27
26
}
28
27
}
29
28
30
- @available ( SwiftStdlib 5 . 5 , * )
31
29
extension LocalWorker {
32
30
@_dynamicReplacement ( for: _remote_function ( ) )
33
31
// TODO(distributed): @_remoteDynamicReplacement(for: function()) - could be a nicer spelling, hiding that we use dynamic under the covers
@@ -44,16 +42,13 @@ extension LocalWorker {
44
42
45
43
// ==== Fake Transport ---------------------------------------------------------
46
44
47
-
48
- @available ( SwiftStdlib 5 . 5 , * )
49
45
struct ActorAddress : ActorIdentity {
50
46
let address : String
51
47
init ( parse address : String ) {
52
48
self . address = address
53
49
}
54
50
}
55
51
56
- @available ( SwiftStdlib 5 . 5 , * )
57
52
struct FakeTransport : ActorTransport {
58
53
func decodeIdentity( from decoder: Decoder ) throws -> AnyActorIdentity {
59
54
fatalError ( " not implemented: \( #function) " )
@@ -83,7 +78,6 @@ struct FakeTransport: ActorTransport {
83
78
84
79
// ==== Execute ----------------------------------------------------------------
85
80
86
- @available ( SwiftStdlib 5 . 5 , * )
87
81
func test_local( ) async throws {
88
82
let transport = FakeTransport ( )
89
83
@@ -95,7 +89,6 @@ func test_local() async throws {
95
89
// CHECK: call: local:
96
90
}
97
91
98
- @available ( SwiftStdlib 5 . 5 , * )
99
92
func test_remote( ) async throws {
100
93
let address = ActorAddress ( parse: " " )
101
94
let transport = FakeTransport ( )
@@ -110,7 +103,6 @@ func test_remote() async throws {
110
103
// CHECK: call: _cluster_remote_echo(name:):Charlie
111
104
}
112
105
113
- @available ( SwiftStdlib 5 . 5 , * )
114
106
@main struct Main {
115
107
static func main( ) async {
116
108
try ! await test_local ( )
0 commit comments