[Issue 6180] Private has no effect on types in modules

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 5 06:03:02 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=6180


dawg at dawgfoto.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dawg at dawgfoto.de


--- Comment #8 from dawg at dawgfoto.de 2012-09-05 06:03:29 PDT ---
>And overload resolution occurs _before_ accessibility is checked

Not until we fix Bug 3254. The same bug thing now applies to the template
access checks.

>Private symbols are perfectly visibile. They're just not accessible.
>...
>You can check out this explanation with regards to C++ (which is essentially
the same)

>However, it _would_ be really nice if we could at least make it so that private
functions weren't considered in overload resolution.

In C++ headers are common and allow to hide implementation symbols. D's current
workaround are handwritten di files (object, core.thread) but we need a better
solution that is scalable and doesn't add redundancy. So far I only came up
with
 HideModuleMembers which hides protected module level symbols but keeps access
checks and overloading for nested scopes.
https://github.com/D-Programming-Language/dmd/pull/739

Probably it's time to rediscuss this on the mailing list.
http://www.digitalmars.com/d/archives/digitalmars/D/visibility_vs._accessibility_of_protected_symbols_157598.html

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list