mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Factor out a new Requirement::getProtocolDecl() utility method
This commit is contained in:
@@ -2700,8 +2700,7 @@ swift::getDirectlyInheritedNominalTypeDecls(
|
||||
if (!req.getFirstType()->isEqual(protoSelfTy))
|
||||
continue;
|
||||
|
||||
result.emplace_back(req.getSecondType()->castTo<ProtocolType>()->getDecl(),
|
||||
loc);
|
||||
result.emplace_back(req.getProtocolDecl(), loc);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user