View mode: basic / threaded / horizontal-split · Log in · Help
October 31, 2012
[Issue 8922] New: __traits(parent, <imported package>) shows current module as a parent
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: nobody@puremagic.com
       ReportedBy: verylonglogin.reg@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg@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: -------
October 31, 2012
[Issue 8922] __traits(parent, <imported package>) shows current module as a parent
http://d.puremagic.com/issues/show_bug.cgi?id=8922



--- Comment #1 from github-bugzilla@puremagic.com 2012-10-31 11:45:19 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/f173f980df42c926ba5fb4b073f779fde2805d81
Add more `std.traits.packageName` unittests

* some of the unittests are commented out because of the Issue 8922
* Issue 8922 URL: http://d.puremagic.com/issues/show_bug.cgi?id=8922

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 10, 2013
[Issue 8922] __traits(parent, <imported package>) shows current module as a parent
http://d.puremagic.com/issues/show_bug.cgi?id=8922


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
          Keywords|                            |pull
                CC|                            |andrej.mitrovich@gmail.com
        AssignedTo|nobody@puremagic.com        |andrej.mitrovich@gmail.com


--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-09 16:03:24 PST ---
https://github.com/D-Programming-Language/dmd/pull/1455

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 19, 2013
[Issue 8922] __traits(parent, <imported package>) shows current module as a parent
http://d.puremagic.com/issues/show_bug.cgi?id=8922



--- Comment #3 from github-bugzilla@puremagic.com 2013-01-19 11:33:27 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/8b31b3d8171abd9e06e1b7f18201fbe25fde20e3
Fixes Issue 8922 - __traits(parent) should fail on top package import

https://github.com/D-Programming-Language/dmd/commit/7d36ee467bf76f371c3b9a6399b00f811320bd65
Merge pull request #1455 from AndrejMitrovic/Fix8922

Issue 8922 - __traits(parent) should fail on top package import

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 19, 2013
[Issue 8922] __traits(parent, <imported package>) shows current module as a parent
http://d.puremagic.com/issues/show_bug.cgi?id=8922


Walter Bright <bugzilla@digitalmars.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
            Status|NEW                         |RESOLVED
                CC|                            |bugzilla@digitalmars.com
        Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 26, 2013
[Issue 8922] __traits(parent, <imported package>) shows current module as a parent
http://d.puremagic.com/issues/show_bug.cgi?id=8922


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |m.strashun@gmail.com


--- Comment #4 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-26 10:02:19 PST ---
*** Issue 9405 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Top | Discussion index | About this forum | D home