Sema: Generalize ProtocolDecl::getPrimaryAssociatedType() to ProtocolDecl::getPrimaryAssociatedTypes()

This commit is contained in:
Slava Pestov
2022-02-18 18:58:26 -05:00
parent 7e5d6f4cb0
commit d7f8f2067a
13 changed files with 94 additions and 53 deletions

View File

@@ -5398,9 +5398,10 @@ bool ProtocolDecl::existentialRequiresAny() const {
ExistentialRequiresAnyRequest{const_cast<ProtocolDecl *>(this)}, true);
}
AssociatedTypeDecl *ProtocolDecl::getPrimaryAssociatedType() const {
ArrayRef<AssociatedTypeDecl *>
ProtocolDecl::getPrimaryAssociatedTypes() const {
return evaluateOrDefault(getASTContext().evaluator,
PrimaryAssociatedTypeRequest{const_cast<ProtocolDecl *>(this)},
PrimaryAssociatedTypesRequest{const_cast<ProtocolDecl *>(this)},
nullptr);
}