Skip to content

Commit af2ada9

Browse files
committed
danmar#6692 False positive: Hidden member variable - parent class with same name in different namespace. Add regression test for FP which got fixed in 1.70 already
1 parent bdd57e6 commit af2ada9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/testclass.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,18 @@ class TestClass : public TestFixture {
367367
"};");
368368
ASSERT_EQUALS("", errout.str());
369369

370+
// #6692
371+
checkDuplInheritedMembers("namespace test1 {\n"
372+
" struct SWibble{};\n"
373+
" typedef SWibble wibble;\n"
374+
"}\n"
375+
"namespace test2 {\n"
376+
" struct SWibble : public test1::wibble {\n"
377+
" int Value;\n"
378+
" };\n"
379+
"}");
380+
ASSERT_EQUALS("", errout.str());
381+
370382
}
371383

372384
void checkCopyConstructor(const char code[]) {

0 commit comments

Comments
 (0)