Skip to content

Commit 59732c9

Browse files
committed
Distributed: Simplify extractDistributedSerializationRequirements()
1 parent 068ca50 commit 59732c9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/AST/DistributedDecl.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,14 +1229,13 @@ swift::extractDistributedSerializationRequirements(
12291229
DA->getAssociatedType(C.Id_SerializationRequirement);
12301230

12311231
for (auto req : allRequirements) {
1232-
if (req.getSecondType()->isAny()) {
1233-
continue;
1234-
}
1235-
if (!req.getFirstType()->hasDependentMember())
1232+
// FIXME: Seems unprincipled
1233+
if (req.getKind() != RequirementKind::SameType &&
1234+
req.getKind() != RequirementKind::Conformance)
12361235
continue;
12371236

12381237
if (auto dependentMemberType =
1239-
req.getFirstType()->castTo<DependentMemberType>()) {
1238+
req.getFirstType()->getAs<DependentMemberType>()) {
12401239
if (dependentMemberType->getAssocType() == daSerializationReqAssocType) {
12411240
auto layout = req.getSecondType()->getExistentialLayout();
12421241
for (auto p : layout.getProtocols()) {

0 commit comments

Comments
 (0)