You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/Distributed/distributed_actor_is_experimental.swift
+15-8Lines changed: 15 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -7,30 +7,37 @@ actor SomeActor {}
7
7
8
8
@available(SwiftStdlib 5.5,*)
9
9
distributedactorDA{}
10
-
// expected-error@-1{{'_Distributed' module not imported, required for 'distributed actor'}}
10
+
// expected-error@-1{{'distributed' modifier is only valid when experimental distributed support is enabled}}
11
11
12
12
@available(SwiftStdlib 5.5,*)
13
-
distributedactorclass DAC {} // expected-error{{distributed' can only be applied to 'actor' definitions, and distributed actor-isolated async functions}}
14
-
// expected-error@-1{{keyword 'class' cannot be used as an identifier here}}
13
+
distributedactorclass DAC {}
14
+
// expected-error@-1{{'distributed' modifier is only valid when experimental distributed support is enabled}}
15
+
// expected-error@-2{{keyword 'class' cannot be used as an identifier here}}
15
16
16
17
actorA{
17
18
func normal()async{}
18
-
distributedfunc dist(){} // expected-error{{'distributed' function can only be declared within 'distributed actor'}}
19
-
distributedfunc distAsync()async{} // expected-error{{'distributed' function can only be declared within 'distributed actor'}}
19
+
distributedfunc dist(){}
20
+
// expected-error@-1{{'distributed' modifier is only valid when experimental distributed support is enabled}}
21
+
distributedfunc distAsync()async{}
22
+
// expected-error@-1{{'distributed' modifier is only valid when experimental distributed support is enabled}}
20
23
21
-
distributedvarneverOk:String{ // expected-error{{'distributed' modifier cannot be applied to this declaration}}
24
+
distributedvarneverOk:String{
25
+
// expected-error@-1{{'distributed' modifier is only valid when experimental distributed support is enabled}}
22
26
"vars are not allowed to be distributed *ever* anyway"
23
27
}
24
28
}
25
29
26
30
@available(SwiftStdlib 5.5,*)
27
31
distributedactorDA2{
28
-
// expected-error@-1{{'_Distributed' module not imported, required for 'distributed actor'}}
32
+
// expected-error@-1{{'distributed' modifier is only valid when experimental distributed support is enabled}}
29
33
func normal()async{}
30
34
distributedfunc dist(){}
35
+
// expected-error@-1{{'distributed' modifier is only valid when experimental distributed support is enabled}}
31
36
distributedfunc distAsync()async{}
37
+
// expected-error@-1{{'distributed' modifier is only valid when experimental distributed support is enabled}}
32
38
33
-
distributedvarneverOk:String{ // expected-error{{'distributed' modifier cannot be applied to this declaration}}
39
+
distributedvarneverOk:String{
40
+
// expected-error@-1{{'distributed' modifier is only valid when experimental distributed support is enabled}}
34
41
"vars are not allowed to be distributed *ever* anyway"
0 commit comments