[Issue 1386] New: "string expected" when using allMembers-element in __traits(getMember, ...)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 30 10:34:50 PDT 2007


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

           Summary: "string expected" when using allMembers-element in
                    __traits(getMember, ...)
           Product: D
           Version: 2.003
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: jascha at mainia.de


import std.stdio;

struct Temp(T...)
{
    alias void delegate(T) asdf;
}

class Asdf
{
    Temp!(uint) asdf;
    Temp!(string) qwer;
    Temp!(real,real) yxcv;
}

void main()
{
    foreach ( member; __traits(allMembers, Asdf) )
    {
        Asdf a;
        writefln("%s %s", member, typeid(typeof(__traits(getMember, a,
member))));
    }
}


-- 



More information about the Digitalmars-d-bugs mailing list