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

           Summary: .tupleof lists members of nested anonymous union as
                    members of containing struct
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: elfy...@gmail.com


--- Comment #0 from Nick Voronin <elfy...@gmail.com> 2010-12-14 07:54:21 PST ---
struct S2
{
    int type;
    union {
        int i;
        string s;
    }
}
void main()
{
    S2 s2;
    foreach (i, Subobj; typeof(s2.tupleof))
    {
    writeln(s2.tupleof[i].stringof);
    }
}

output:
---
s2.type
s2.i
s2.s
---

This in turn leads to wrong behaviour of std.exception.pointsTo, which tries
every member of union (read: all kind of invalid pointers) without any clue
that they are actually part of nested union.

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

Reply via email to