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

           Summary: _traits(allMembers, X) ignores version guards inside X
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: and...@metalanguage.com


--- Comment #0 from Andrei Alexandrescu <and...@metalanguage.com> 2010-09-09 
08:09:51 PDT ---
Consider:

import std.stdio;

struct A
{
    version (none)
    {
        int x;
    }
    else
    {
        int y;
    }
    int z;
}

void main()
{
    foreach (s; __traits(allMembers, A))
        writeln(s);
}

Surprisingly, this prints

x
z

although version "none" is not defined.

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

Reply via email to