www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8246] New: type tuple fields pollute the linker namespace


           Summary: type tuple fields pollute the linker namespace
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: timon.gehr gmx.ch

DMD 2.059:

template TypeTuple(T...){ alias T TypeTuple; }
TypeTuple!int x;
int _x_field_0;

static assert(x[0].mangleof != _x_field_0.mangleof); // fail

The static assertion should pass.
(if the assertion is commented out, the code generates a linker error.)

The compiler must use a reserved identifier, for example
__tuple_x_field_0 instead of _x_field_0

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 14 2012