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

           Summary: Local imports are order sensitive
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: peter.alexander...@gmail.com


--- Comment #0 from Peter Alexander <peter.alexander...@gmail.com> 2012-01-20 
12:54:07 PST ---
According to the language reference: "The order in which ImportDeclarations
occur has no significance."

This is true for module scope imports in DMD (2.057 tested), but not for
function scope imports.

---
import std.stdio;
void main() {
  writeln("foo"); //ok
}
---
void main() {
  writeln("foo"); //ok
}
import std.stdio;
---
void main() {
  import std.stdio;
  writeln("foo"); // ok
}
---
void main() {
  writeln("foo"); // error, writeln undefined
  import std.stdio;
}
---

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

Reply via email to