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:
@@ -3399,7 +3399,7 @@ bool ContextualFailure::tryProtocolConformanceFixIt(
|
||||
auto conformanceDiag =
|
||||
emitDiagnostic(diag::assign_protocol_conformance_fix_it, constraint,
|
||||
nominal->getDescriptiveKind(), fromType);
|
||||
if (nominal->getInherited().size() > 0) {
|
||||
if (!nominal->getInherited().empty()) {
|
||||
auto lastInherited = nominal->getInherited().back().getLoc();
|
||||
auto lastInheritedEndLoc =
|
||||
Lexer::getLocForEndOfToken(getASTContext().SourceMgr, lastInherited);
|
||||
|
||||
Reference in New Issue
Block a user