[Issue 143] 'package' does not work at all

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 9 04:47:27 PST 2010


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


Michal Minich <michal.minich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michal.minich at gmail.com


--- Comment #2 from Michal Minich <michal.minich at 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: -------


More information about the Digitalmars-d-bugs mailing list