File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ // RUN: %target-typecheck-verify-swift -enable-experimental-associated-type-inference
2+ // RUN: not %target-typecheck-verify-swift -disable-experimental-associated-type-inference
3+
4+ // Reduced from the distributed actors implementation. This didn't type check in 5.10
5+ // but works now.
6+
7+ protocol DistributedActorSystem < SerializationRequirement> {
8+ associatedtype SerializationRequirement
9+ }
10+
11+ protocol DistributedActor where SerializationRequirement == ActorSystem . SerializationRequirement {
12+ associatedtype ActorSystem : DistributedActorSystem
13+ associatedtype SerializationRequirement
14+ }
15+
16+ class Worker < ActorSystem> : DistributedActor where ActorSystem: DistributedActorSystem , ActorSystem. SerializationRequirement == Int { }
17+
18+ struct FakeActorSystem : DistributedActorSystem {
19+ typealias SerializationRequirement = Int
20+ }
21+
22+ print ( Worker < FakeActorSystem > . SerializationRequirement. self)
You can’t perform that action at this time.
0 commit comments