Skip to content

Commit 1a2fcc0

Browse files
Update testother.cpp
1 parent 83c8136 commit 1a2fcc0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/testother.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3974,6 +3974,13 @@ class TestOther : public TestFixture {
39743974
" return (void*)&s;\n"
39753975
"}\n"); // don't crash
39763976
ASSERT_EQUALS("", errout_str());
3977+
3978+
check("struct S { int i; };\n" // #14251
3979+
"struct T { std::optional<S> s; };\n"
3980+
"void f(T& t) {\n"
3981+
" t.s->i = 0;\n"
3982+
"}\n");
3983+
ASSERT_EQUALS("", errout_str());
39773984
}
39783985

39793986
void constParameterCallback() {

0 commit comments

Comments
 (0)