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

           Summary: Accepts-invalid template forward reference bug related
                    to derivedMembers
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: c...@klickverbot.at


--- Comment #0 from klickverbot <c...@klickverbot.at> 2012-04-08 15:13:00 PDT 
---
This code compiles using DMD e0cdcac, but failed as expected using DMD 2.058:
---
template B(T) {
  mixin(
    {
      foreach (name; __traits(derivedMembers, T)) {}
      return "struct B {}";
    }()
  );
}

struct A {
  pragma(msg, "A: ", __traits(compiles, B!(typeof(this))));
  B!(typeof(this)) c;
  static if (nonExistent!()) {}
}

auto d = A.init.c;
---

(output is �A: false�, but apparently the template can be instantiated
afterwards)

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

Reply via email to