Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle package access visibility #770

Open
ryuukk opened this issue Jan 2, 2024 · 0 comments
Open

Handle package access visibility #770

ryuukk opened this issue Jan 2, 2024 · 0 comments

Comments

@ryuukk
Copy link
Contributor

ryuukk commented Jan 2, 2024

If module a has functions that are marked package, they should be only seen when requesting completions from a module within package a

https://dlang.org/spec/attribute.html#package

Relevant region:

bool mightBeRelevantInCompletionScope(const DSymbol* symbol, Scope* scope_)
{
import dparse.lexer : tok;
if (symbol.protection == tok!"private" &&
!scope_.hasSymbolRecursive(symbol))
{
// scope is the scope of the current file so if the symbol is not in there, it's not accessible
return false;
}
return true;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant