Skip to content

Commit

Permalink
Update testcondition.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Aug 23, 2024
1 parent 9c65e40 commit 53ff026
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/testcondition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4893,6 +4893,15 @@ class TestCondition : public TestFixture {
" }\n"
"}\n");
ASSERT_EQUALS("", errout_str());

check("void f(bool a, bool b) {\n" // #12937
" bool c = !a && b;\n"
" if (a) {}\n"
" else {\n"
" if (c) {}\n"
" }\n"
"}\n");
ASSERT_EQUALS("", errout_str());
}

void alwaysTrueInfer() {
Expand Down

0 comments on commit 53ff026

Please sign in to comment.