D-Programming-Language/dmd — pull request #1386 by AndrejMitrovic (2012-12-18 23:50:48+00:00)
Title: Issue 5385 - Access must be checked for static and __gshared fields

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

`private` and `package` should work for `static` and `__gshared` fields, since the latter two only designate where the data is stored in memory .

Note that these accepts-invalid test-cases were already correctly rejected if you were using a class instance object (e.g. `foo.x`) rather than the class type (e.g. `Foo.x`) to access static/__gshared fields which we had no access privilege to.