www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - traits help

reply Bauss <jj_1337 live.dk> writes:
I'm trying to retrieve all functions with a certain attribute.

I know how to go about it and I can get it working with functions 
in the same module as the traits expression, but as soon as I 
nest modules in packages and import those packages then I don't 
get any functions.

Is there a way to make "allMembers" search across all imported 
modules. My modules are deep nested and can be nested in up to 5 
packages in.

What I do now is I do an "allMembers" on the root module which 
imports all top pakages, these top packages import other packages 
that does the same, so it's a nested hell of packages.

One I get all members I check with "hasUDA", but I don't even get 
any members in. All I get from "allMembers" is the module itself 
and "object". Even if I place functions inside the module or 
anything then I still don't get it. It's like it can't deal with 
too many nested packages, then it loses track of itself and its 
own members.

So is it an issue with "allMembers" that it can't deal with 
nested packages or is it me that's doing something wrong.

The funny part is, if I move the code into a new module then it 
will work for local symbols, but still not for the actual 
Sep 18 2016
parent reply ketmar <ketmar ketmar.no-ip.org> writes:
Sep 18 2016
parent Bauss <jj_1337 live.dk> writes:
On Sunday, 18 September 2016 at 13:28:15 UTC, ketmar wrote:
Thanks that clarifies my issues... Do you if there are any statuses on that?
Sep 18 2016