https://issues.dlang.org/show_bug.cgi?id=19590
--- Comment #5 from Basile-z <[email protected]> --- After thinking more about the problem, I have concluded that what should be done is to add to the AST a new Dsymbol derived class called "ImportWrapper". It would solve the problem that the information that your in the "import domain" is lost and without using the FQN trick, which did not respect the fact that a sym has a single ident. class ImportWrapper : Dsymbol { this(Ident id, ImportWrapper iw, Module m) { super(id); module_ = m; next = iw; } ImportWrapper next; Module module_; override Dsymbol search(const ref Loc loc, Identifier ident, int flags = IgnoreNone) { // if .next is assigned than return whether (next.identifier == ident) // if .module_ is assisgned then forward result of module_.search() } } so that for `import std.algorithm;` `allMembers` can include "std", just as now but `getMember` on this "std" gives an ImportWrapper instance that has no `.module_` but a `.next`. `allMember` on "std" can return "algorithm". This way partial import in the chain is not lost and sub modules that are not imported by the ImportStatement are not visible. --
