mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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:
@@ -226,7 +226,7 @@ void ConformanceLookupTable::inheritConformances(ClassDecl *classDecl,
|
||||
if (superclassLoc.isValid())
|
||||
return superclassLoc;
|
||||
|
||||
for (const auto &inherited : classDecl->getInherited()) {
|
||||
for (const auto &inherited : classDecl->getInherited().getEntries()) {
|
||||
if (auto inheritedType = inherited.getType()) {
|
||||
if (inheritedType->getClassOrBoundGenericClass()) {
|
||||
superclassLoc = inherited.getSourceRange().Start;
|
||||
|
||||
Reference in New Issue
Block a user