[Issue 9210] New: [2.061 beta] Import cycle causes unpredictable compile errors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 26 13:26:54 PST 2012


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

           Summary: [2.061 beta] Import cycle causes unpredictable compile
                    errors
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: sludwig at outerproduct.org


--- Comment #0 from Sönke Ludwig <sludwig at outerproduct.org> 2012-12-26 13:26:51 PST ---
Created an attachment (id=1173)
Reproduction case

Compiling the following three files using `dmd -c a.d` causes the compiler to
fail compiling code in std.complex:

a.d
---
import b;
interface A {}
---

b.d
---
import c;
import std.datetime;
interface B : A {}
---

c.d
---
import a;
interface C : A {}
---

output:
---
C:\D\dmd2\windows\bin\..\..\src\phobos\std\complex.d(678): Error: struct
std.complex.Complex does not match any template declaration
C:\D\dmd2\windows\bin\..\..\src\phobos\std\complex.d(678): Error:
Complex!(real) is used as a type
[...]
---

The error occurs for different configurations of imports and triggers errors in
completely different locations. Does not occur using DMD 2.060.

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


More information about the Digitalmars-d-bugs mailing list