Skip to content

Commit 1da0164

Browse files
committed
[AST] Distributed: Simplify handling of SerializationRequirement expressed through a conformance constraint
1 parent 9dec692 commit 1da0164

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

lib/AST/DistributedDecl.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,19 +164,7 @@ Type swift::getDistributedActorSerializationType(
164164
actorProtocol->getAssociatedType(ctx.Id_SerializationRequirement)
165165
->getDeclaredInterfaceType();
166166

167-
auto protocols = sig->getRequiredProtocols(serializationTy);
168-
if (protocols.empty())
169-
return Type();
170-
171-
SmallVector<Type, 2> members;
172-
llvm::transform(protocols, std::back_inserter(members), [](const auto *P) {
173-
return P->getDeclaredInterfaceType();
174-
});
175-
176-
return ExistentialType::get(
177-
ProtocolCompositionType::get(ctx, members,
178-
/*inverses=*/{},
179-
/*HasExplicitAnyObject=*/false));
167+
return sig->getExistentialType(serializationTy);
180168
}
181169

182170
return resultTy;

0 commit comments

Comments
 (0)