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

           Summary: template structs with two bool parameters confuse DMD
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Puneet Goel <[email protected]> 2012-12-11 11:09:19 PST 
---
The following code does not compile. But starts compiling once the first line
of function noCall is commented out and the next two line which are logically
equivalent are uncommented.

It seems compile time parameters of type bool are not propagated well by
symbols in certain situations.

struct Foo (bool S, bool L) {
  auto noCall() {
    Foo!(S, false) x;        // compiles if this line commented
    // static if(S) Foo!(true, false) x;
    // else         Foo!(false, false) x;
  }
  this (T) (T other)        // constructor
  if (is (T unused == Foo!(P, Q), bool P, bool Q)) { }
}

void main() {
  Foo!(false, true) k = Foo!(false, false)();
}

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

Reply via email to