[Issue 10378] Local imports hide local symbols

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Oct 7 17:00:45 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=10378

--- Comment #11 from deadalnix <deadalnix at gmail.com> ---
(In reply to hsteoh from comment #10)
> @deadalnix: Unfortunately this would require some rather big changes in
> dmdfe... currently, imports are implemented by actually inserting symbols
> from the imported module into the symbol table of the current scope. So
> either we would have to hack the symbol table to mark imported symbols as
> being imported, and modify symbol lookup to ignore such symbols the first
> time round; or, we'd have to introduce an additional symbol table per
> lexical scope for holding imported symbols, alongside the "normal" symbol
> table.

We have to sell it to Walter as a way to make D compile faster (as it allow for
more lazy imports).

--


More information about the Digitalmars-d-bugs mailing list