[Issue 7809] New: __traits(getMember can be used with a type although the spec says it cannot

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 2 03:07:24 PDT 2012


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

           Summary: __traits(getMember can be used with a type although
                    the spec says it cannot
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: websites
        AssignedTo: nobody at puremagic.com
        ReportedBy: simendsjo at gmail.com


--- Comment #0 from simendsjo <simendsjo at gmail.com> 2012-04-02 03:07:54 PDT ---
struct S {
  int i;
}

is( typeof(__traits(getMember, S, "i")) == int ) // works

The spec, on the other hand, says it cannot be used on non-static fields.
That's my interpretation.

http://dlang.org/traits.html#getMember

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


More information about the Digitalmars-d-bugs mailing list