[Issue 16044] New: __traits(allMembers) returns empty tuple for subpackages

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed May 18 09:47:28 PDT 2016


          Issue ID: 16044
           Summary: __traits(allMembers) returns empty tuple for
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: yoplitein at gmail.com

Given abc/def/package.d:
module abc.def;

int xyz;

static this()
    pragma(msg, __traits(allMembers, mixin(__MODULE__)));

When compiled with `dmd -c abc/def/package.d`, it should print `tuple("object",
"xyz", "_staticCtor1")` but instead only prints an empty tuple.
For top level packages, it works as expected.


More information about the Digitalmars-d-bugs mailing list