diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-12-04 12:26:12 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-04 19:26:12 +0100 |
commit | 144b9610867ad4ea021f690f25151e60ab6bce65 (patch) | |
tree | d1f4b6d561bd39a6e499f4761f9d1be66e8551e3 | |
parent | cba58392bcd234e9b09095a36e012b0b0cff6ba5 (diff) |
Fix bug in hasBoundVar (#5600)
Led to issues while debugging another issue related to free variables in assumptions.
-rw-r--r-- | src/expr/node_algorithm.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/expr/node_algorithm.cpp b/src/expr/node_algorithm.cpp index 9d1c6ab41..f41bef37b 100644 --- a/src/expr/node_algorithm.cpp +++ b/src/expr/node_algorithm.cpp @@ -261,7 +261,11 @@ bool hasBoundVar(TNode n) { for (auto i = n.begin(); i != n.end() && !hasBv; ++i) { - hasBv = hasBoundVar(*i); + if (hasBoundVar(*i)) + { + hasBv = true; + break; + } } } if (!hasBv && n.hasOperator()) |