digitalmars.D.learn - private module symbols
- Flo (20/20) Apr 10 2009 Hi,
- Gide Nwawudu (4/24) Apr 10 2009 Looks like a variant of bug 314.
- Flo (5/10) Apr 12 2009 I see.
- Stewart Gordon (5/7) Apr 19 2009 Actually, it's this one
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)
Apr 10 2009
On Fri, 10 Apr 2009 05:24:24 -0400, Flo <the_big_flo 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
Apr 10 2009
Gide Nwawudu Wrote:Looks like a variant of bug 314. http://d.puremagic.com/issues/show_bug.cgi?id=314 GideI see. Although this means its not only a problem with static, selective or renamed imports but with importing in general. And I think this is a severe one since protection is kinda important to OO programming. Flo
Apr 12 2009
Gide Nwawudu wrote: <snip>Looks like a variant of bug 314. http://d.puremagic.com/issues/show_bug.cgi?id=314Actually, it's this one http://d.puremagic.com/issues/show_bug.cgi?id=2830 Stewart.
Apr 19 2009