← Back to index
|
Original Bugzilla link
Bug 7168 – Regression(2.057) __traits(allMembers) returns wrong tuple
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-12-27T01:08:00Z
Last change time
2011-12-31T18:09:35Z
Keywords
patch, wrong-code
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0
by k.hara.pg — 2011-12-27T01:08:23Z
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
Comment #1
by k.hara.pg — 2011-12-27T01:20:27Z
https://github.com/D-Programming-Language/dmd/pull/584
Comment #2
by k.hara.pg — 2011-12-27T07:31:41Z
Sorry, D1 does not have __traits. So this is D2 only issue.
Comment #3
by bugzilla — 2011-12-31T18:09:35Z
https://github.com/D-Programming-Language/dmd/commit/afc7cfebdd71b105e9fb78b1023ce706fc7945f5