mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Code completion for overrides: don't suggest to override members from outer
nominals in inner nominals Swift SVN r16890
This commit is contained in:
@@ -1852,9 +1852,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void addDesignatedInitializers() {
|
||||
Type CurrTy = CurrDeclContext->getInnermostTypeContext()
|
||||
->getDeclaredTypeInContext();
|
||||
void addDesignatedInitializers(Type CurrTy) {
|
||||
if (!CurrTy)
|
||||
return;
|
||||
const auto *NTD = CurrTy->getAnyNominal();
|
||||
@@ -1878,9 +1876,11 @@ public:
|
||||
}
|
||||
|
||||
void getOverrideCompletions(SourceLoc Loc) {
|
||||
lookupVisibleDecls(*this, CurrDeclContext, TypeResolver.get(),
|
||||
/*IncludeTopLevel=*/false, Loc);
|
||||
addDesignatedInitializers();
|
||||
Type CurrTy =
|
||||
CurrDeclContext->getInnermostTypeContext()->getDeclaredTypeInContext();
|
||||
lookupVisibleMemberDecls(*this, CurrTy, CurrDeclContext,
|
||||
TypeResolver.get());
|
||||
addDesignatedInitializers(CurrTy);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user