class X { void foo(){} } class Y : X { void bar(){} } enum ObjectMems = ["toString","toHash","opCmp","opEquals","Monitor","factory"]; static assert([__traits(allMembers, X)] == ["foo"]~ObjectMems); // pass static assert([__traits(allMembers, Y)] == ["bar", "foo"]~ObjectMems); // fail static assert([__traits(allMembers, Y)] != ["bar", "foo"]); // fail This bug was introduced by merging pull #437. D2 branch commit: https://github.com/D-Programming-Language/dmd/commit/87682481da9cbbe2715a81edbdc76c0735f644f6 D1 branch commit: https://github.com/D-Programming-Language/dmd/commit/191ddb032a64cf278b6890ebc72b6d0135428d62
https://github.com/D-Programming-Language/dmd/pull/584
Sorry, D1 does not have __traits. So this is D2 only issue.
https://github.com/D-Programming-Language/dmd/commit/afc7cfebdd71b105e9fb78b1023ce706fc7945f5