Le 28/11/2011 03:29, Alexey Veselovsky a écrit :






D's private is different than some other languages (e.g. C++). 'private' 
provides access to the entire module.

public: no access limitation

private: access by the module

package: access by the modules of the package

protected: access by the inheriting classes

But it works even if class Foo declarated in dufferent module.

Also this code works:

module a;

private { struct S {int a;}}

--------

module b:
import a:

void f() {S s; s.a=42;}

So you now have discovered a bug.

Reply via email to