www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - private static bug

class MyClass

private int _staticVariable;

void test()
MyClass mc = new MyClass();
mc._staticVariable;//NOT accessible (correct)
MyClass._staticVariable;//IS accessible (bug in compiler)

As you can see from this example, private static variables can still be accessed
from outside the module, if the private static is called from its class.
Apr 20 2005