private module symbols

Gide Nwawudu gide at btinternet.com
Fri Apr 10 07:19:22 PDT 2009


On Fri, 10 Apr 2009 05:24:24 -0400, Flo <the_big_flo at web.de> wrote:

>Hi,
>
>Im kinda confused about the protection attributes on module level.
>The case:
>I've got 2 modules.
>test1.d
>
>module test1;
>
>import test2;
>
>int main(char[][] args)
>{
>	Test2Struct s;
>	return 0;
>}
>
>and test2.d
>
>module test2;
>
>private struct Test2Struct
>{
>	int var;
>}
>
>
>From my understanding of the docs, i shouldn't be able to use the struct in test1. But it compiles and runs fine and so i'm not sure how to hide symbols to other modules. Is it possible at all?
>
>(oh and im using dmd 1.043)

Looks like a variant of bug 314.
http://d.puremagic.com/issues/show_bug.cgi?id=314

Gide


More information about the Digitalmars-d-learn mailing list