[Issue 10378] Local imports hide local symbols

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Sep 23 11:34:17 PDT 2014


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

Andrei Alexandrescu <andrei at erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei at erdani.com
           Severity|normal                      |critical

--- Comment #6 from Andrei Alexandrescu <andrei at erdani.com> ---
An example that doesn't compile today for the sake of illustration: 

void main(string[] group)
{
    import std.algorithm, std.stdio;
    writeln(group);
}

This is a critical bug. I'm raising it accordingly.

One simple idea (that would nevertheless break existing code): only allow
"static import xyz;" and "import xyz : sym1, sym2;" at local scope.

--


More information about the Digitalmars-d-bugs mailing list