D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9692 - __traits(allMembers) fails on module without a package
Summary: __traits(allMembers) fails on module without a package
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: Andrej Mitrovic
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2013-03-11 16:47 UTC by Andrej Mitrovic
Modified: 2013-04-08 04:11 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2013-03-11 16:47:59 UTC
module test;
import dir.other;
pragma(msg, __traits(allMembers, dir.other));  // ok

import other;
pragma(msg, __traits(allMembers, other));  // ng

void main(){ }

--- 

module other;
int j;

---

module dir.other;
int j;


$ rdmd test.d
> Error: import other has no members
Comment 1 Andrej Mitrovic 2013-03-11 16:54:02 UTC
https://github.com/D-Programming-Language/dmd/pull/1739
Comment 2 github-bugzilla 2013-04-05 05:03:38 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c29aaef47e0777c86ecf45d078e4d536981d4049
Fixes Issue 9692 - allMembers trait should work on module without a package.

https://github.com/D-Programming-Language/dmd/commit/5b7fdf3f45c4e960847f307c55dc598bcd3d4045
Merge pull request #1739 from AndrejMitrovic/Fix9692

Issue 9692 - allMembers trait should work on module without a package.