Skip to content

Commit 3be7164

Browse files
committed
[Distributed] serialization req must be existential
1 parent 7165b4e commit 3be7164

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/AST/DistributedDecl.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,9 @@ swift::getDistributedSerializationRequirements(
271271
if (existentialRequirementTy->isAny())
272272
return true; // we're done here, any means there are no requirements
273273

274-
if (auto alias = dyn_cast<TypeAliasType>(existentialRequirementTy.getPointer())) {
275-
auto ty = alias->getDesugaredType();
276-
if (isa<ClassType>(ty) || isa<StructType>(ty) || isa<EnumType>(ty)) {
277-
// SerializationRequirement cannot be class or struct nowadays
278-
return false;
279-
}
274+
if (!existentialRequirementTy->isExistentialType()) {
275+
// SerializationRequirement must be an existential type
276+
return false;
280277
}
281278

282279
ExistentialType *serialReqType = existentialRequirementTy

0 commit comments

Comments
 (0)