Summary: __traits(allMembers) is broken for template instances
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD

--- Comment #0 from Andrej Mitrovic <> 2012-02-29 
03:08:58 PST ---
import std.stdio;

struct Base(bool T)
    static if (T)
        int x;

    int y;

void main()
    alias Base!false Type;
    auto fields = [__traits(allMembers, Type)];

    writeln(fields);  // writes ["x", "y"]

"x" does not exist in the Base!false instance.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to