Pacikage level access broken?
Jacob Carlborg
doob at me.com
Sun Apr 22 23:19:12 PDT 2012
On 2012-04-23 01:21, Era Scarecrow wrote:
> I think I have a misunderstanding of how 'package' is suppose to work.
> How I understand it, you will give access to the directory, unlike
> private which will hide it outside of the same file.
>
> This problem comes up since a struct is declared inside a package (and
> even instantiated), however access to it is lacking. Here's my two
> sources. Using DMD v2.059 (Win32)
>
> --- t1.d
> module t1;
>
> import std.stdio;
>
> class Priv { //private by default
> int i;
> struct S {
> int s_i;
> }
"public" is the default access level.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list