[Issue 11234] Address of private method from another module can be taken
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 12 12:23:35 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11234
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
CC| |andrej.mitrovich at gmail.com
Summary|Method of another module is |Address of private method
|callable, even if they is |from another module can be
|private. |taken
--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-10-12 12:23:34 PDT ---
Reduced a little bit:
-----
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() { }
}
-----
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list