From 53ff026509d77400317288bdb1e819b6b3e530c4 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Fri, 23 Aug 2024 11:46:21 +0200 Subject: [PATCH] Update testcondition.cpp --- test/testcondition.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/testcondition.cpp b/test/testcondition.cpp index 45ec8d5fb248..76dc90b736f3 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -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() {