From 92b9514bdef67aadf50200e6dbafc66243e46e08 Mon Sep 17 00:00:00 2001 From: Tristan Penman Date: Thu, 24 Aug 2023 09:18:24 +1000 Subject: [PATCH] Revert "fail with the first unmet constraint to avoid running into type mismatches" This reverts commit aee67d58f05972555bfd1e7ce5451da4333e6348. I believe the original intention of this code was to fall through to later constraints, even if earlier constraints were not satisfied. This is not captured by any of the tests in the test suite, which is an oversight on my part. --- include/valijson/subschema.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/valijson/subschema.hpp b/include/valijson/subschema.hpp index 10d795a..5e22bf5 100644 --- a/include/valijson/subschema.hpp +++ b/include/valijson/subschema.hpp @@ -120,7 +120,7 @@ public: { bool allTrue = true; for (auto &&constraint : m_constraints) { - allTrue = allTrue && applyFunction(*constraint); + allTrue = applyFunction(*constraint) && allTrue; } return allTrue;