← Back to index
|
Original Bugzilla link
Bug 8922 – __traits(parent, <imported package>) shows current module as a parent
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-31T10:54:00Z
Last change time
2013-01-26T10:02:19Z
Keywords
pull, wrong-code
Assigned to
andrej.mitrovich
Creator
verylonglogin.reg
Comments
Comment #0
by verylonglogin.reg — 2012-10-31T10:54:17Z
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`.
Comment #1
by github-bugzilla — 2012-10-31T11:45:19Z
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
Comment #2
by andrej.mitrovich — 2013-01-09T16:03:24Z
https://github.com/D-Programming-Language/dmd/pull/1455
Comment #3
by github-bugzilla — 2013-01-19T11:33:27Z
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
Comment #4
by andrej.mitrovich — 2013-01-26T10:02:19Z
*** Issue 9405 has been marked as a duplicate of this issue. ***