allMembers returns no members for a package

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 19 06:05:35 PST 2014


On Fri, 19 Dec 2014 13:55:53 +0000
aldanor via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> On Friday, 19 December 2014 at 12:06:08 UTC, ketmar via 
> Digitalmars-d wrote:
> > On Fri, 19 Dec 2014 02:12:40 +0000
> > aldanor via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> >
> >> pkg/
> >>      c/
> >>          module1.d
> >>              module pkg.c.module1;
> >>              int x = 1;
> >>          package.d
> >>              module pkg.c;
> >>              public import pkg.c.module1;
> >>      test.d
> >>          module pkg.test;
> >>          unittest {
> >>              import std.stdio;
> >>              import pkg.c;
> >>              writeln(pkg.c.x);
> >>              writeln(__traits(allMembers, pkg.c));
> >>          }
> >> 
> >> Results in "1" printed and then nothing.
> >> 
> >> Why does allMembers fail on a package, is that supposed to 
> >> happen?
> >
> > this is a known issue (sorry, can't remember bug number, and 
> > search in
> > bugzilla never worked for me for some mysterious reason). this 
> > will
> > eventually be fixed, but don't expect it soon, it's not a 
> > high-priority
> > issue.
> I see, thanks. Is there an open tracker issue for this?
> 
> What's even more weird is that in some cases it does work (but 
> most likely doesn't) and I can't seem to figure out what's the 
> defining factor.

i remember that there was a discussion about this in NG, and some
issues filled, but sorry, my search-fu sux. maybe someone with better
skills will provide the links.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141219/33856a5a/attachment-0001.sig>


More information about the Digitalmars-d mailing list