http://d.puremagic.com/issues/show_bug.cgi?id=11234
Summary: Method of another module is callable, even if they is private. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: rswhi...@googlemail.com --- Comment #0 from rswhi...@googlemail.com 2013-10-12 12:20:03 PDT --- A.d: ---- import B; class Foo { public: void call(Bar b) { void delegate(int) dg = &b.test; dg(42); } } void main() { Bar b = new Bar(); Foo f = new Foo(); f.call(b); } ---- B.d: ---- import std.stdio; class Bar { private: void test(int id) { writeln("Bar called with ", id); } } ---- Output: Bar called with 42 But should be rejected. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------