1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// PRMS Id: 8518 // Bug: Call to foo is not checked for accessibility class A { private: static void foo() {} // ERROR - public: void goo() {} }; struct B : public A { void func() { foo(); } // ERROR - }; int main() { B b; b.func(); }