mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Introduce abstraction for extension/type decl inheritance clauses.
Wrap the `InheritedEntry` array available on both `ExtensionDecl` and `TypeDecl` in a new `InheritedTypes` class. This class will provide shared conveniences for working with inherited type clauses. NFC.
This commit is contained in:
@@ -861,7 +861,7 @@ AccessLevel Symbol::getEffectiveAccessLevel(const ExtensionDecl *ED) {
|
||||
}
|
||||
|
||||
AccessLevel maxInheritedAL = AccessLevel::Private;
|
||||
for (auto Inherited : ED->getInherited()) {
|
||||
for (auto Inherited : ED->getInherited().getEntries()) {
|
||||
if (const auto Type = Inherited.getType()) {
|
||||
if (const auto *Proto = dyn_cast_or_null<ProtocolDecl>(
|
||||
Type->getAnyNominal())) {
|
||||
|
||||
Reference in New Issue
Block a user