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

           Summary: Import statements are order dependent; should be order
                    independent
           Product: D
           Version: 2.032
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: sandf...@jhu.edu


In DMD 2.032, the order of import statements seems to be important.
Specifically, with regard to cyclic import statements. Below is a simple test
case using two files winapi.d and wincom.d

module winapi;
public import wincom;   // If the import is here, winapi does not compile
public import std.c.windows.windows;
//public import wincom; // If the import is here, winapi compiles
alias HRESULT THEMEAPI;

module wincom;
public import winapi; 
public import std.c.windows.com;
HRESULT hresult;

When compiling winapi, wincom errors are generated:
wincom.d(6): Error: identifier 'HRESULT' is not defined
wincom.d(6): Error: HRESULT is used as a type
wincom.d(6): Error: variable wincom.hresult voids have no value

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

Reply via email to