[Issue 284] New: Wrong type of template value parameter

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 12 13:15:33 PDT 2006


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

           Summary: Wrong type of template value parameter
           Product: D
           Version: 0.163
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: oskar.linde at gmail.com


struct A(int x) { }

template B(uint x) {
    static if (x == 3)
        static assert(is(A!(3) == A!(x)));
}

static this() { B!(3); } 

---

file.d(5): static assert  (is(A  == A )) is false

---

Two instances of A!(3) is created. One with an int value type and the other one
with a uint(!) value type. The mangled forms are *__T1AVi3Z1A and *__T1AVk3Z1A
respectively.


-- 




More information about the Digitalmars-d-bugs mailing list