Skip to content

Commit b1abe1b

Browse files
authored
Merge pull request #68451 from ktoso/wip-radar-91857262
[Distributed] Add test coverage for extension where Self: DistributedActor
2 parents 59df11b + 954c38b commit b1abe1b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-typecheck-verify-swift -disable-availability-checking
2+
// REQUIRES: concurrency
3+
// REQUIRES: distributed
4+
5+
import Distributed
6+
7+
/// This adds test coverage for rdar://91857262 in which the extension below would cause a crash.
8+
protocol GamePlayer: Sendable, Identifiable where ID == LocalTestingDistributedActorSystem.ActorID {}
9+
10+
extension GamePlayer where Self: DistributedActor, ActorSystem == LocalTestingDistributedActorSystem {
11+
distributed func startGame(with opponent: String) -> String { opponent }
12+
}
13+
14+
distributed actor FishPlayer: GamePlayer {
15+
typealias ActorSystem = LocalTestingDistributedActorSystem
16+
}

0 commit comments

Comments
 (0)