hide private functions
This commit is contained in:
parent
98d09a2fe5
commit
951870e06f
|
@ -69,6 +69,8 @@ DSymbol*[] getSymbolsForUFCS(Scope* completionScope, const(DSymbol)* beforeDotSy
|
||||||
HashSet!size_t visited;
|
HashSet!size_t visited;
|
||||||
// local imports only
|
// local imports only
|
||||||
FilteredAppender!(a => a.isCallableWithArg(beforeDotSymbol), DSymbol*[]) app;
|
FilteredAppender!(a => a.isCallableWithArg(beforeDotSymbol), DSymbol*[]) app;
|
||||||
|
FilteredAppender!(a => a.protection != tok!"private", DSymbol*[]) globalsFunctions;
|
||||||
|
|
||||||
while (currentScope !is null && currentScope.parent !is null)
|
while (currentScope !is null && currentScope.parent !is null)
|
||||||
{
|
{
|
||||||
auto localImports = currentScope.symbols.filter!(a => a.kind == CompletionKind.importSymbol);
|
auto localImports = currentScope.symbols.filter!(a => a.kind == CompletionKind.importSymbol);
|
||||||
|
@ -95,8 +97,12 @@ DSymbol*[] getSymbolsForUFCS(Scope* completionScope, const(DSymbol)* beforeDotSy
|
||||||
{
|
{
|
||||||
if (sym.qualifier == SymbolQualifier.selectiveImport)
|
if (sym.qualifier == SymbolQualifier.selectiveImport)
|
||||||
app.put(sym.type);
|
app.put(sym.type);
|
||||||
else
|
else{
|
||||||
sym.type.getParts(internString(null), app, visited);
|
sym.type.getParts(istring(null), globalsFunctions, visited);
|
||||||
|
foreach(gSym; globalsFunctions) {
|
||||||
|
app.put(gSym);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return app.data;
|
return app.data;
|
||||||
|
|
|
@ -25,4 +25,6 @@ void ufcsBarRefConst(ref const Foo foo, string mama)
|
||||||
void ufcsBarRefConstWrapped(ref const(Foo) foo, string mama) {}
|
void ufcsBarRefConstWrapped(ref const(Foo) foo, string mama) {}
|
||||||
void ufcsBarRefImmuttableWrapped(ref immutable(Foo) foo, string mama) {}
|
void ufcsBarRefImmuttableWrapped(ref immutable(Foo) foo, string mama) {}
|
||||||
void ufcsBarScope(ref scope Foo foo, string mama) {}
|
void ufcsBarScope(ref scope Foo foo, string mama) {}
|
||||||
void ufcsBarReturnScope(return scope Foo foo, string mama) {}
|
void ufcsBarReturnScope(return scope Foo foo, string mama) {}
|
||||||
|
private void privateUfcsBar(Foo foo, string message) {}
|
||||||
|
void notUfcsBar(string message) {}
|
Loading…
Reference in New Issue