www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12720] New: Non-int integral template parameters not mangled


          Issue ID: 12720
           Summary: Non-int integral template parameters not mangled
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: kai redstar.de

This is a followup of fixed issue 3467. The name mangling is still wrong.

struct foo( ulong n ) {
    foo!( n ) bar( ) {
        typeof( return ) result;
        return result;

void main( ) {
    foo!( 4 ) baz;
    baz = baz.bar;// FAIL

The bar function of

foo!( 4 ) baz

is mangled as


but bar function of

foo!( 4L ) baz

is mangled as


In both cases, I would expect


because the type parameter is ulong.

There is a partial fix in the source (template.c, around line 7249) but this
does not compile.

May 08 2014