From 32fe9f005ce270a9f5a47b0fab1f8a718edbd1be Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 3 Apr 2024 16:28:44 +0200 Subject: bug fix in expresion, Union: propagate the disjointness property To avoid too many intermediate results, we compute the union of a list in a divide and conquer fashion. Of course, for a disjoint union, the recursive calls on the lists of half the length have to be disjoint as well, i.e., the template parameter kDisjoint has to be passed on. Fix this. (cherry picked from commit 469a7190bee490344d147099c3511fc45e2aadf0) --- src/buildtool/build_engine/expression/evaluator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buildtool/build_engine/expression/evaluator.cpp') diff --git a/src/buildtool/build_engine/expression/evaluator.cpp b/src/buildtool/build_engine/expression/evaluator.cpp index d2cee809..f75c643e 100644 --- a/src/buildtool/build_engine/expression/evaluator.cpp +++ b/src/buildtool/build_engine/expression/evaluator.cpp @@ -307,8 +307,8 @@ auto Union(Expression::list_t const& dicts, size_t from, size_t to) return entry; } size_t mid = from + (to - from) / 2; - auto left = Union(dicts, from, mid); - auto right = Union(dicts, mid, to); + auto left = Union(dicts, from, mid); + auto right = Union(dicts, mid, to); if (left->Map().empty()) { return right; } -- cgit v1.2.3