@@ -40,6 +40,61 @@ struct MissingRemoteCall: DistributedActorSystem {
40
40
}
41
41
}
42
42
43
+ struct MissingRemoteCall_missing_makeInvocationEncoder : DistributedActorSystem {
44
+ // expected-error@-1{{type 'MissingRemoteCall_missing_makeInvocationEncoder' does not conform to protocol 'DistributedActorSystem'}}
45
+
46
+ typealias ActorID = ActorAddress
47
+ typealias InvocationDecoder = FakeInvocationDecoder
48
+ typealias InvocationEncoder = FakeInvocationEncoder
49
+ typealias SerializationRequirement = Codable
50
+
51
+ func resolve< Act> ( id: ActorID , as actorType: Act . Type )
52
+ throws -> Act ? where Act: DistributedActor {
53
+ return nil
54
+ }
55
+
56
+ func assignID< Act> ( _ actorType: Act . Type ) -> ActorID
57
+ where Act: DistributedActor {
58
+ ActorAddress ( parse: " fake://123 " )
59
+ }
60
+
61
+ func actorReady< Act> ( _ actor : Act )
62
+ where Act: DistributedActor ,
63
+ Act. ID == ActorID {
64
+ }
65
+
66
+ func remoteCall< Act, Err, Res> (
67
+ on actor : Act ,
68
+ target: RemoteCallTarget ,
69
+ invocation: inout InvocationEncoder ,
70
+ throwing: Err . Type ,
71
+ returning: Res . Type
72
+ ) async throws -> Res
73
+ where Act: DistributedActor ,
74
+ Act. ID == ActorID ,
75
+ Err: Error ,
76
+ Res: SerializationRequirement {
77
+ fatalError ( " NOT IMPLEMENTED \( #function) " )
78
+ }
79
+
80
+ func remoteCallVoid< Act, Err> (
81
+ on actor : Act ,
82
+ target: RemoteCallTarget ,
83
+ invocation: inout InvocationEncoder ,
84
+ throwing: Err . Type
85
+ ) async throws
86
+ where Act: DistributedActor ,
87
+ Act. ID == ActorID ,
88
+ Err: Error {
89
+ fatalError ( " NOT IMPLEMENTED \( #function) " )
90
+ }
91
+
92
+ func resignID( _ id: ActorID ) {
93
+ }
94
+
95
+ // func makeInvocationEncoder() -> InvocationEncoder {} // MISSING
96
+ }
97
+
43
98
struct Error_wrongReturn : DistributedActorSystem {
44
99
// expected-error@-1{{struct 'Error_wrongReturn' is missing witness for protocol requirement 'remoteCall'}}
45
100
// expected-note@-2{{protocol 'Error_wrongReturn' requires function 'remoteCall' with signature:}}
0 commit comments