Summary: Ambiguous mangling of module and template in template
                    symbol args
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-05-08 08:50:17 PDT ---
Consider the program:

module y;
import std.typecons;
template f(alias s) {
    void f() {
void g(){}
void main() {
    f!( std.typecons )();  // A
    f!( f )();             // B
    f!( g )();             // C

The manglings are:

A:   _D1y22__T1fS133std8typeconsZ1fFZv
B:   _D1y12__T1fS41y1fZ1fFZv
C:   _D1y17__T1fS9_D1y1gFZvZ1fFZv

Here, the module 'std.typecons' and 'f' are simply encoded as a QualifiedName,
unlike 'g' which is encoded as a MangledName. However, with this it is very
hard for the demangler to tell the QualifiedName in A and B only have 13 and 4
characters respectively, instead of 133 and 41.

There should be some separator between the 13/4 and the 3/1, or a type should
be defined for module and templates, and encode them with MangledName instead
of QualifiedName.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to