https://issues.dlang.org/show_bug.cgi?id=15335

bb.t...@gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #3 from bb.t...@gmx.com ---
I've looked at your PR on GH and obviously the first one is better since it
just prevents the error.

The accessibility is a more global problem. Every time someone will put a
function related to traits in a module and use this function in another module
the same error will pop up. A mixin template allows to inject the function
related to traits in the module it's used. So far it's ok, let's say for a
private usage, (actually there's --0-- mixin template in phobos so I doubt
they'll ever accept some new functions based on this, even if it works).

Maybe the real solution would be to make "__traits(getMember,...)", and more
generally speaking all the traits verbs that might also block compilation
because of this, able to return any member, regardless of the protection.

Then it would be up to the user to respect or not the protection using an
additional "__traits(getProtection,...)" to filter an item in the traits code.

--

Reply via email to