[Issue 2260] New: Template uniqueness not valid anymore from 1.031 to 1.033

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 1 03:59:40 PDT 2008


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

           Summary: Template uniqueness not valid anymore from 1.031 to
                    1.033
           Product: D
           Version: 1.033
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: walter at mail.math.uni-magdeburg.de


The following template-chain does not work correctly, when applied multiple
times:

> class inner (alias F) { }
> 
> template outer(alias B)
> {
>   void function( inner!(B) ) outer;
> }
> 
> template rawmanglednameof(alias A)
> {
>   const char[] rawmanglednameof = typeof(&outer!(A)).mangleof;
> }
> 
> Stdout.formatln ("{}", rawmanglednameof !(func));
> Stdout.formatln ("{}", rawmanglednameof !(args));
> 
> // results in 
> 
> PPFC4Test35__T5innerS22_D4Test4funcFiJiKiLiYvZ5innerZv
> PPFC4Test35__T5innerS22_D4Test4funcFiJiKiLiYvZ5innerZv
> 
> // in dmd-1.033 it correctly was:
> 
> PPFC4Test35__T5innerS22_D4Test4funcFiJiKiLiYvZ5innerZv
> PPFC4Test39__T5innerS26_D4Test4mainFAAaZi4argsAAaZ5innerZv

So it seems, the template is not unique anymore! This bug is confirmed by Don
Clugston and it is necessary to work for the compile-time demanglers in
dsource/ddl/meta and dsource/meta projects.


-- 



More information about the Digitalmars-d-bugs mailing list