Skip to content

Commit c53c87e

Browse files
committed
Add test
1 parent f6b31b7 commit c53c87e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/testclass.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ class TestClass : public TestFixture {
195195
TEST_CASE(const98);
196196
TEST_CASE(const99);
197197
TEST_CASE(const100);
198+
TEST_CASE(const101);
198199

199200
TEST_CASE(const_handleDefaultParameters);
200201
TEST_CASE(const_passThisToMemberOfOtherClass);
@@ -6972,6 +6973,16 @@ class TestClass : public TestFixture {
69726973
ASSERT_EQUALS("", errout_str()); // don't crash
69736974
}
69746975

6976+
void const101() {
6977+
checkConst("struct error {\n"
6978+
" error() = default;\n"
6979+
"};\n"
6980+
"struct S : U {\n"
6981+
" int f() { return this->error(); }\n"
6982+
"};\n");
6983+
ASSERT_EQUALS("", errout_str());
6984+
}
6985+
69756986
void const_handleDefaultParameters() {
69766987
checkConst("struct Foo {\n"
69776988
" void foo1(int i, int j = 0) {\n"

0 commit comments

Comments
 (0)