@@ -29,6 +29,41 @@ distributed actor SpecifyRequirement: NoSerializationRequirementYet {
2929 distributed func testAT( ) async throws -> NotCodable {
3030 . init( )
3131 }
32+
33+ }
34+
35+ protocol ProtocolWithChecksSystem : DistributedActor
36+ where ActorSystem == FakeActorSystem {
37+ // expected-error@+1{{result type 'NotCodable' of distributed instance method 'testAT' does not conform to serialization requirement 'Codable'}}
38+ distributed func testAT( ) async throws -> NotCodable
39+ }
40+ distributed actor ProtocolWithChecksSystemDA : ProtocolWithChecksSystem {
41+ // expected-error@+1{{result type 'NotCodable' of distributed instance method 'testAT' does not conform to serialization requirement 'Codable'}}
42+ distributed func testAT( ) async throws -> NotCodable { . init( ) }
43+ }
44+
45+ protocol ProtocolWithChecksSeqReq : DistributedActor
46+ where Self. SerializationRequirement == Codable {
47+ // expected-error@+1{{result type 'NotCodable' of distributed instance method 'testAT' does not conform to serialization requirement 'Codable'}}
48+ distributed func testAT( ) async throws -> NotCodable
49+ }
50+ distributed actor ProtocolWithChecksSeqReqDA_MissingSystem : ProtocolWithChecksSeqReq {
51+ // expected-error@-1{{distributed actor 'ProtocolWithChecksSeqReqDA_MissingSystem' does not declare ActorSystem it can be used with.}}
52+ // expected-note@-2{{you can provide a module-wide default actor system by declaring:}}
53+ // expected-error@-3{{type 'ProtocolWithChecksSeqReqDA_MissingSystem' does not conform to protocol 'ProtocolWithChecksSeqReq'}}
54+ //
55+ // expected-error@-5{{distributed actor 'ProtocolWithChecksSeqReqDA_MissingSystem' does not declare ActorSystem it can be used with.}}
56+
57+ // Entire conformance is doomed, so we didn't proceed to checking the functions; that's fine
58+ distributed func testAT( ) async throws -> NotCodable { . init( ) }
59+ }
60+
61+ distributed actor ProtocolWithChecksSeqReqDA : ProtocolWithChecksSeqReq {
62+ typealias ActorSystem = FakeActorSystem
63+ // ok, since FakeActorSystem.SerializationRequirement == ProtocolWithChecksSeqReq.SerializationRequirement
64+
65+ // expected-error@+1{{result type 'NotCodable' of distributed instance method 'testAT' does not conform to serialization requirement 'Codable'}}
66+ distributed func testAT( ) async throws -> NotCodable { . init( ) }
3267}
3368
3469extension NoSerializationRequirementYet {
0 commit comments