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:
@@ -3539,7 +3539,7 @@ public:
|
||||
AddEquatableContext(NominalTypeDecl *Decl)
|
||||
: DC(Decl), Adopter(Decl->getDeclaredType()),
|
||||
StartLoc(Decl->getBraces().Start),
|
||||
ProtocolsLocations(Decl->getInherited()),
|
||||
ProtocolsLocations(Decl->getInherited().getEntries()),
|
||||
Protocols(getAllProtocols(Decl)),
|
||||
ProtInsertStartLoc(Decl->getNameLoc()),
|
||||
StoredProperties(Decl->getStoredProperties()),
|
||||
@@ -3548,7 +3548,7 @@ public:
|
||||
AddEquatableContext(ExtensionDecl *Decl)
|
||||
: DC(Decl), Adopter(Decl->getExtendedType()),
|
||||
StartLoc(Decl->getBraces().Start),
|
||||
ProtocolsLocations(Decl->getInherited()),
|
||||
ProtocolsLocations(Decl->getInherited().getEntries()),
|
||||
Protocols(getAllProtocols(Decl->getExtendedNominal())),
|
||||
ProtInsertStartLoc(Decl->getExtendedTypeRepr()->getEndLoc()),
|
||||
StoredProperties(Decl->getExtendedNominal()->getStoredProperties()),
|
||||
|
||||
Reference in New Issue
Block a user