www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20094] New: POSIX: Wrong substitution for templates with


          Issue ID: 20094
           Summary: POSIX: Wrong substitution for templates with argument
                    in same namespace
           Product: D
           Version: D2
          Hardware: All
                OS: Other
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: pro.mathias.lang gmail.com

extern(C++, "xdr")
    struct xvector (T) {}
    alias Value = xvector!(ubyte);

extern(C++) void test200XX(xvector!(Value)* v);
static assert(test200XX.mangleof == `_Z9test200XXPN3xdr7xvectorIS0_IhEEE`);

This fails. Mangling difference:
Expected: _Z9test200XXPN3xdr7xvectorIS0_IhEEE
Actual:   _Z9test200XXPN3xdr7xvectorIS_IhEEE

Notice that `S_` (the first element) is used, instead of `S0_` (the second).
So it seems like one element is not properly added to the array of elements.
Will work on a fix. Most likely introduced by some large refactoring in 2.087.

Jul 31 2019