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

           Summary: Module dependency cycle causes import statements
                    inside typeof() expressions inside templates fail
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from S�nke Ludwig <[email protected]> 2013-10-11 08:39:51 
PDT ---
Compiling the following with "dmd -c a.d" results in a failure of the last 
static assertion. Removing the actual dependency of b on a by commenting out 
the declaration of J lets the assertion pass.

This bug is the supposed cause for loads of bogus error messages referring to 
"startsWith" or "Appender". I was sure that the issue was already reported, but 
didn't find anything useful, except for some possibly related bugs that have no 
reduced test case.

This is a regression introduced in DMD 2.061.

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

b.d
---
import a;

interface J : I {} // remove this line to make it work

static assert(is(typeof({ import c; }))); // OK
pragma(msg, B!().result); // just instantiates the template

template B() {
    static assert(is(typeof({ import c; }))); // FAILS
    enum result = "WORKS";
}
---

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

Reply via email to