diff --git a/test/testclass.cpp b/test/testclass.cpp index 85f0c7f0a3e..4cf8dc3e86f 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -8440,6 +8440,15 @@ class TestClass : public TestFixture { " void g() { f(); }\n" "};"); ASSERT_EQUALS("", errout.str()); + + checkUselessOverride("struct B { virtual void f(); };\n" // #11808 + "struct D : B { void f() override {} };\n" + "struct D2 : D {\n" + " void f() override {\n" + " Base::method();\n" + " }\n" + "};"); + ASSERT_EQUALS("", errout.str()); } #define checkUnsafeClassRefMember(code) checkUnsafeClassRefMember_(code, __FILE__, __LINE__)