According to D docs ( http://www.digitalmars.com/d/2.0/attribute.html#ProtectionAttribute ) the protected members of the module are illegal, but the compiler allows me to do this.
module foo;
protected
{
int bar;
}
Is this a documentation error, a compiler error, or am I doing something wrong?
In fact, this is not the only inconsistency between the documentation and reality, is this link ( http://www.digitalmars.com/d/2.0 ) so relevant? Is there a more actual description of the language somewhere?
My configuration: dmd 2.047, Windows 7, x86
source
share