mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #36170 from slavapestov/requirement-get-protocol-decl
AST: Factor out a new Requirement::getProtocolDecl() utility method
This commit is contained in:
@@ -6247,8 +6247,7 @@ void ModuleFile::finishNormalConformance(NormalProtocolConformance *conformance,
|
||||
for (const auto &req : proto->getRequirementSignature()) {
|
||||
if (req.getKind() != RequirementKind::Conformance)
|
||||
continue;
|
||||
ProtocolDecl *proto =
|
||||
req.getSecondType()->castTo<ProtocolType>()->getDecl();
|
||||
ProtocolDecl *proto = req.getProtocolDecl();
|
||||
auto iter = conformancesForProtocols.find(proto);
|
||||
if (iter != conformancesForProtocols.end()) {
|
||||
reqConformances.push_back(iter->getSecond());
|
||||
|
||||
Reference in New Issue
Block a user