Does the 'package' protection attribute not work?

Jacob Carlborg doob at me.com
Mon Aug 8 04:14:47 PDT 2011


On 2011-08-08 09:11, Jonathan M Davis wrote:
> On Monday 08 August 2011 08:55:22 Jacob Carlborg wrote:
>> Or because neither of the modules are in package they are perhaps in an
>> implicit global package making "package" in this case behave as public.
>
> Except that I don't think that sub-packages have access to the package
> functions in their parent packages, and if that's true, then it's not the same
> as public. However, if they _do_ have access to their parent packages' package
> functions, then it _is_ the same as public. I don't think that they do though.
> But of course, I could be wrong about that.
>
> - Jonathan M Davis

No, sub-packages don't have access to the parent package. Hence the "in 
this case". I guess I wasn't very clear.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list