We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c25210f commit 3955f5eCopy full SHA for 3955f5e
lib/IDE/CodeCompletion.cpp
@@ -303,6 +303,9 @@ static bool shouldHideDeclFromCompletionResults(const ValueDecl *D) {
303
if (D->getName().isEditorPlaceholder())
304
return true;
305
306
+ if (!D->isUserAccessible())
307
+ return true;
308
+
309
return false;
310
}
311
@@ -2048,7 +2051,6 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
2048
2051
2049
2052
void addVarDeclRef(const VarDecl *VD, DeclVisibilityKind Reason) {
2050
2053
if (!VD->hasName() ||
- !VD->isUserAccessible() ||
2054
(VD->hasAccessibility() && !VD->isAccessibleFrom(CurrDeclContext)) ||
2055
shouldHideDeclFromCompletionResults(VD))
2056
return;
0 commit comments