mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Frontend: Use getAllInheritedProtocols()
This commit is contained in:
@@ -669,11 +669,9 @@ public:
|
||||
|
||||
// First record all protocols that have already been handled.
|
||||
for (ProtocolDecl *proto : IncludedProtocols) {
|
||||
proto->walkInheritedProtocols(
|
||||
[&handledProtocols](ProtocolDecl *inherited) -> TypeWalker::Action {
|
||||
handledProtocols.insert(inherited);
|
||||
return TypeWalker::Action::Continue;
|
||||
});
|
||||
handledProtocols.insert(proto);
|
||||
auto allInherited = proto->getAllInheritedProtocols();
|
||||
handledProtocols.insert(allInherited.begin(), allInherited.end());
|
||||
}
|
||||
|
||||
// Preserve the behavior of previous implementations which formatted of
|
||||
|
||||
Reference in New Issue
Block a user