http://d.puremagic.com/issues/show_bug.cgi?id=8922

           Summary: __traits(parent, <imported package>) shows current
                    module as a parent
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin....@gmail.com> 2012-10-31 
20:54:17 MSK ---
This issue is for globally imported symbols only:

m2.d:
---
module p2.m2;
---

m1.d:
---
module p1.m1;

import p2.m2;

static assert(!__traits(compiles, __traits(parent, p2))); // fails

void main()
{
    static assert(!__traits(compiles, __traits(parent, p2))); // fails
    import p2.m2;
    static assert(!__traits(compiles, __traits(parent, p2))); // passes
}

pragma(msg, __traits(parent, p2)); // prints `module m1` instead of error
---

This issue affects `std.traits.packageName`.

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

Reply via email to