Skip to content

Commit b5219c3

Browse files
committed
Make sure we don't crash on missing ActorSystem typealias
Refs rdar://90886302
1 parent dc6d784 commit b5219c3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// RUN: %target-swift-frontend -typecheck -verify -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+
// rdar://90886302 This test would crash if not typealias ActorSystem was declared for an actor
10+
distributed actor Fish {
11+
// expected-error@-1{{distributed actor 'Fish' does not declare ActorSystem it can be used with.}}
12+
// expected-error@-2{{distributed actor 'Fish' does not declare ActorSystem it can be used with.}}
13+
// expected-note@-3{{you can provide a module-wide default actor system by declaring:\ntypealias DefaultDistributedActorSystem = <#ConcreteActorSystem#>}}
14+
15+
distributed func tell(_ text: String, by: Fish) {
16+
// What would the fish say, if it could talk?
17+
}
18+
}

0 commit comments

Comments
 (0)