Skip to content

Commit a6941e6

Browse files
committed
fix rebase; remove duped type
1 parent 56c6dd0 commit a6941e6

File tree

3 files changed

+5
-68
lines changed

3 files changed

+5
-68
lines changed

lib/Sema/TypeCheckDistributed.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,6 @@ bool swift::checkDistributedActorSystem(const NominalTypeDecl *system) {
447447
// work to enable associatedtypes to be constrained to class or protocol,
448448
// which then will unlock using them as generic constraints in protocols.
449449
Type requirementTy = getDistributedSerializationRequirementType(nominal, DAS);
450-
requirementTy->dump();
451-
452450
if (auto existentialTy = requirementTy->getAs<ExistentialType>()) {
453451
requirementTy = existentialTy->getConstraintType();
454452
}

test/Distributed/distributed_actor_system_missing_adhoc_requirement_impls.swift

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -41,67 +41,6 @@ struct MissingRemoteCall: DistributedActorSystem {
4141
}
4242
}
4343

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

test/Distributed/distributed_serializationRequirement_must_be_protocol.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ final class SomeEnum: Sendable {}
1616
final class System: DistributedActorSystem {
1717
// ignore those since they all fail with the SerializationRequirement being invalid:
1818
// expected-error@-2{{type 'System' does not conform to protocol 'DistributedActorSystem'}}
19-
// expected-note@-3{{protocol 'System' requires function 'remoteCallVoid'}}
19+
// expected-note@-3{{protocol 'DistributedActorSystem' requires function 'remoteCallVoid'}}
2020
// expected-error@-4{{class 'System' is missing witness for protocol requirement 'remoteCall'}}
21-
// expected-note@-5{{protocol 'System' requires function 'remoteCall' with signature:}}
21+
// expected-note@-5{{protocol 'DistributedActorSystem' requires function 'remoteCall' with signature:}}
2222
// expected-error@-6{{class 'System' is missing witness for protocol requirement 'remoteCallVoid'}}
2323
typealias ActorID = String
2424
typealias InvocationEncoder = ClassInvocationEncoder
@@ -81,9 +81,9 @@ final class System: DistributedActorSystem {
8181
}
8282

8383
struct ClassInvocationEncoder: DistributedTargetInvocationEncoder {
84-
// expected-note@-1{{protocol 'ClassInvocationEncoder' requires function 'recordArgument' with signature:}}
84+
// expected-note@-1{{protocol 'DistributedTargetInvocationEncoder' requires function 'recordArgument' with signature:}}
8585
// expected-error@-2{{struct 'ClassInvocationEncoder' is missing witness for protocol requirement 'recordArgument'}}
86-
// expected-note@-3{{protocol 'ClassInvocationEncoder' requires function 'recordReturnType' with signature:}}
86+
// expected-note@-3{{protocol 'DistributedTargetInvocationEncoder' requires function 'recordReturnType' with signature:}}
8787
// expected-error@-4{{struct 'ClassInvocationEncoder' is missing witness for protocol requirement 'recordReturnType'}}
8888
typealias SerializationRequirement = SomeClazz
8989

@@ -97,7 +97,7 @@ struct ClassInvocationEncoder: DistributedTargetInvocationEncoder {
9797

9898
final class ClassInvocationDecoder: DistributedTargetInvocationDecoder {
9999
// expected-error@-1{{class 'ClassInvocationDecoder' is missing witness for protocol requirement 'decodeNextArgument'}}
100-
// expected-note@-2{{protocol 'ClassInvocationDecoder' requires function 'decodeNextArgument'}}
100+
// expected-note@-2{{protocol 'DistributedTargetInvocationDecoder' requires function 'decodeNextArgument'}}
101101
typealias SerializationRequirement = SomeClazz
102102

103103
public func decodeGenericSubstitutions() throws -> [Any.Type] {

0 commit comments

Comments
 (0)