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


Michal Minich <michal.min...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michal.min...@gmail.com


--- Comment #2 from Michal Minich <michal.min...@gmail.com> 2010-12-09 04:45:31 
PST ---
test for package and private in DMD 2.050 shows that only functions and
functions aliases works for both modifiers; and variables works for private
only.

[test.d]
import pack.mod;

void main () {
    i = 1;
    //pi = 1; // OK - Error: module main pack.mod.pi is private
    S s;
    C c = new C;
    U u;
    //fn ();  // OK - Error: function mod.fn is not accessible from main
    //aFn (); // OK - Error: function mod.fn is not accessible from main
    aS as;
}

[pack/mod.d]
module pack.mod;

package : // private is ignored too
int i;
struct S {}
class C {}
union U {}
alias S aS;

// these works OK
void fn () {}
alias fn aFn;
private int pi;

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

Reply via email to