http://d.puremagic.com/issues/show_bug.cgi?id=3819

           Summary: [module system] Tiding up the imports
           Product: D
           Version: 2.040
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2010-02-18 10:24:06 PST ---
import std.stdio;
void main() {
    std.stdio.writefn(1);
    writefln(2); // (A)
}

This program has to raise a compilation error at the line (A), because this
line:
import std.stdio;
Has to import only the 'std.stdio' name in the current namespace.

To import (discouraged practice) all names from a module a specific syntax may
be invented, like:

import std.stdio.*;
void main() {
    writefln(1);
    std.stdio.writefn(2); // (B)
}

That imports all the names but not the module name itself, so the line (B) has
to raise an error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to