www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19805] New: wrong windows mangling for generic arguments with

https://issues.dlang.org/show_bug.cgi?id=19805

          Issue ID: 19805
           Summary: wrong windows mangling for generic arguments with two
                    identical template args
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ilyayaroshenko gmail.com

C++
==================================
template<class T, class T> struct C {};
template<class T> struct R {};

void bar3(C<int*, int*>) {}
void bar4(C<R<int>, R<int>>) {}

// ?bar3  YAXU?$C PEAHPEAH   Z
// ?bar4  YAXU?$C U?$R H  U1    Z
==================================

D
==================================
struct C(T1, T2) {}
struct R(T) {}

extern(C++):

void bar3(C!(int*, int*));
void bar4(C!(R!int, R!int));

pragma(msg, bar3.mangleof);
pragma(msg, bar4.mangleof);

// ?bar3  YAXU?$C PEAH0   Z (wrong)
// ?bar4  YAXU?$C U?$R H  0   Z (wrong)
==================================

--
Apr 13 2019