On Saturday, 12 October 2013 at 19:07:44 UTC, Andrej Mitrovic wrote:
On 10/12/13, Namespace <rswhi...@googlemail.com> wrote:
Bug or feature? :P

Has to be a bug. Reduced:

-----
module a;
import b;

void main()
{
    auto s = S();
    auto f = &s.f;  // no error
    f();  // no error

    auto sf = &S.sf;  // error
}
-----

-----
module b;
struct S
{
    private void f() { }
    private static void sf() { }
}
-----

Ok, I've opened a bug report for this.
Otherwise it would be a nice C++-friend like feature. :D Of course, a bit protection would be needed.

Reply via email to