Skip to content

Commit d8ff967

Browse files
committed
Sema: Use Requirement::getProtocolDecl()
1 parent 9ad5af6 commit d8ff967

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10256,13 +10256,9 @@ performMemberLookup(ConstraintKind constraintKind, DeclNameRef memberName,
1025610256
if (req.getKind() != RequirementKind::Conformance)
1025710257
return false;
1025810258

10259-
if (auto protocolTy =
10260-
req.getSecondType()->template getAs<ProtocolType>()) {
10261-
return req.getFirstType()->hasTypeVariable() &&
10262-
protocolTy->getDecl()->isSpecificProtocol(
10263-
KnownProtocolKind::Sendable);
10264-
}
10265-
return false;
10259+
return (req.getFirstType()->hasTypeVariable() &&
10260+
req.getProtocolDecl()->isSpecificProtocol(
10261+
KnownProtocolKind::Sendable));
1026610262
})) {
1026710263
result.OverallResult = MemberLookupResult::Unsolved;
1026810264
return result;

0 commit comments

Comments
 (0)