mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Generalize ProtocolDecl::getRequirementSignature() to a new RequirementSignature type
The RequirementSignature generalizes the old ArrayRef<Requirement> which stores the minimal requirements that a conforming type's witnesses must satisfy, to also record the protocol typealiases defined in the protocol.
This commit is contained in:
@@ -3633,7 +3633,7 @@ public:
|
||||
dependencyTypes.insert(elementType);
|
||||
}
|
||||
|
||||
for (Requirement req : proto->getRequirementSignature()) {
|
||||
for (Requirement req : proto->getRequirementSignature().getRequirements()) {
|
||||
// Requirements can be cyclic, so for now filter out any requirements
|
||||
// from elsewhere in the module. This isn't perfect---something else in
|
||||
// the module could very well fail to compile for its own reasons---but
|
||||
@@ -3661,7 +3661,7 @@ public:
|
||||
|
||||
writeGenericParams(proto->getGenericParams());
|
||||
S.writeGenericRequirements(
|
||||
proto->getRequirementSignature(), S.DeclTypeAbbrCodes);
|
||||
proto->getRequirementSignature().getRequirements(), S.DeclTypeAbbrCodes);
|
||||
S.writeAssociatedTypes(
|
||||
proto->getAssociatedTypeMembers(), S.DeclTypeAbbrCodes);
|
||||
writeMembers(id, proto->getAllMembers(), true);
|
||||
|
||||
Reference in New Issue
Block a user