Skip to content

Commit 51c676c

Browse files
authored
Merge pull request #68449 from ktoso/wip-add-test-dist-dont-crash
Add test to make sure we don't crash on missing ActorSystem typealias
2 parents 55f0be0 + b5219c3 commit 51c676c

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)