Skip to content

Commit 0edd0f0

Browse files
committed
[Distributed] serialization req must be existential
1 parent 1062625 commit 0edd0f0

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
@@ -316,12 +316,9 @@ swift::getDistributedSerializationRequirements(
316316
if (existentialRequirementTy->isAny())
317317
return true; // we're done here, any means there are no requirements
318318

319-
if (auto alias = dyn_cast<TypeAliasType>(existentialRequirementTy.getPointer())) {
320-
auto ty = alias->getDesugaredType();
321-
if (isa<ClassType>(ty) || isa<StructType>(ty) || isa<EnumType>(ty)) {
322-
// SerializationRequirement cannot be class or struct nowadays
323-
return false;
324-
}
319+
if (!existentialRequirementTy->isExistentialType()) {
320+
// SerializationRequirement must be an existential type
321+
return false;
325322
}
326323

327324
ExistentialType *serialReqType = existentialRequirementTy

0 commit comments

Comments
 (0)