Skip to content

Commit 04e5f32

Browse files
committed
Distributed: Simplify extractDistributedSerializationRequirements()
1 parent f14e50f commit 04e5f32

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/AST/DistributedDecl.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,14 +1230,11 @@ swift::extractDistributedSerializationRequirements(
12301230
DA->getAssociatedType(C.Id_SerializationRequirement);
12311231

12321232
for (auto req : allRequirements) {
1233-
if (req.getSecondType()->isAny()) {
1234-
continue;
1235-
}
1236-
if (!req.getFirstType()->hasDependentMember())
1233+
if (req.getKind() != RequirementKind::SameType)
12371234
continue;
12381235

12391236
if (auto dependentMemberType =
1240-
req.getFirstType()->castTo<DependentMemberType>()) {
1237+
req.getFirstType()->getAs<DependentMemberType>()) {
12411238
if (dependentMemberType->getAssocType() == daSerializationReqAssocType) {
12421239
auto layout = req.getSecondType()->getExistentialLayout();
12431240
for (auto p : layout.getProtocols()) {

0 commit comments

Comments
 (0)