[Issue 11595] New: __traits(allMembers, packageName) behaves oddly.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 24 12:33:53 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11595

           Summary: __traits(allMembers, packageName) behaves oddly.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: shammah.chancellor at gmail.com


--- Comment #0 from Shammah Chancellor <shammah.chancellor at gmail.com> 2013-11-24 12:33:52 PST ---
I have:

    module messages;

    public import messages.chat;
    public import messages.auth;
    public import messages.channel;
    public import messages.core;

from messages.core.d:

    pragma(msg, __traits(allMembers, messages);


prints: 
tuple("object", "std", "vibe", "client", "user", "channels", "messages",
"ChatMessage", "PrivateMessage")

prints the standard D objects for that package.d, but also the items in
messages.auth, but NOTHING from the other public imports.  I would not expect
it to print anything but the D objects and the modulename's for the modules
being imported.

It doesn't seem to be possible to reflect on modules, and then on elements in
modules at the current time as there is also no way to get an identifier back
for a package from it's string returned from allMembers.

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


More information about the Digitalmars-d-bugs mailing list