Re: Iterate module membres

2017-01-07 Thread ketmar via Digitalmars-d-learn
On Saturday, 7 January 2017 at 13:45:53 UTC, crimaniak wrote: Ok, I found it: https://issues.dlang.org/show_bug.cgi?id=16044 yep. sorry, my search-fu is completely broken, so i didn't provide you with the number.

Re: Iterate module membres

2017-01-07 Thread crimaniak via Digitalmars-d-learn
Ok, I found it: https://issues.dlang.org/show_bug.cgi?id=16044

Re: Iterate module membres

2017-01-07 Thread crimaniak via Digitalmars-d-learn
On Saturday, 7 January 2017 at 12:29:34 UTC, ketmar wrote: On Saturday, 7 January 2017 at 12:11:20 UTC, crimaniak wrote: Is this a bug or documentation problem? well, it's hard to say. package.d is one of the cases where you *have* to provide explicit module definition. ;-) 'cause implicit

Re: Iterate module membres

2017-01-07 Thread ketmar via Digitalmars-d-learn
p.s.: otherwise, it *should* work with explicit module declaration. but then, we have some well-known bugs with cross-module introspection, and some heisenbugs with package introspection.

Re: Iterate module membres

2017-01-07 Thread ketmar via Digitalmars-d-learn
On Saturday, 7 January 2017 at 12:11:20 UTC, crimaniak wrote: Is this a bug or documentation problem? well, it's hard to say. package.d is one of the cases where you *have* to provide explicit module definition. ;-) 'cause implicit one creates module with name `package`, which is teh

Re: Iterate module membres

2017-01-07 Thread crimaniak via Digitalmars-d-learn
On Saturday, 7 January 2017 at 10:38:29 UTC, ketmar wrote: On Saturday, 7 January 2017 at 10:27:51 UTC, Nicholas Wilson wrote: Do you require a module statement per chance? it doesn't matter. if there is no explicit module declaration, compiler will insert implicit one. from the code PoV,

Re: Iterate module membres

2017-01-07 Thread ketmar via Digitalmars-d-learn
On Saturday, 7 January 2017 at 10:27:51 UTC, Nicholas Wilson wrote: Do you require a module statement per chance? it doesn't matter. if there is no explicit module declaration, compiler will insert implicit one. from the code PoV, there is no difference at all.

Re: Iterate module membres

2017-01-07 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 7 January 2017 at 09:46:54 UTC, crimaniak wrote: Hi! I need to iterate module members and find specific classes (and make tuple). class foo{}; pragma (msg, __traits(allMembers,mixin(__MODULE__))); gives me empty tuple. I found also this thread from 2011:

Re: Iterate module membres

2017-01-07 Thread ketmar via Digitalmars-d-learn
On Saturday, 7 January 2017 at 09:46:54 UTC, crimaniak wrote: Hi! I need to iterate module members and find specific classes (and make tuple). class foo{}; pragma (msg, __traits(allMembers,mixin(__MODULE__))); gives me empty tuple. works like a charm both in 2.071 and in git HEAD.