File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend -typecheck -verify -enable-experimental-distributed -disable-availability-checking -I %t 2>&1 %s
2+
3+ // UNSUPPORTED: back_deploy_concurrency
4+ // REQUIRES: concurrency
5+ // REQUIRES: distributed
6+
7+ import Distributed
8+
9+ // This system does not exist: but we should not crash, but just diagnose about it:
10+ typealias DefaultDistributedActorSystem = ClusterSystem // expected-error{{cannot find type 'ClusterSystem' in scope}}
11+
12+ distributed actor MyActor {
13+ // expected-error@-1{{distributed actor 'MyActor' does not declare ActorSystem it can be used with}}
14+ // expected-note@-2{{you can provide a module-wide default actor system by declaring:}}
15+ // expected-error@-3{{type 'MyActor' does not conform to protocol 'DistributedActor'}}
16+
17+ distributed var foo : String {
18+ return " xyz "
19+ }
20+ }
21+
22+ distributed actor BadSystemActor {
23+ // expected-error@-1{{distributed actor 'BadSystemActor' does not declare ActorSystem it can be used with}}
24+ // expected-note@-2{{you can provide a module-wide default actor system by declaring:}}
25+ // expected-error@-3{{type 'BadSystemActor' does not conform to protocol 'DistributedActor'}}
26+
27+ // This system does not exist: but we should not crash, but just diagnose about it:
28+ typealias ActorSystem = ClusterSystem // expected-error{{cannot find type 'ClusterSystem' in scope}}
29+ }
You can’t perform that action at this time.
0 commit comments