diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-04-09 21:18:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-09 21:18:19 -0500 |
commit | f2f1e2312d0dd98e89fef63d6595234e27ba5b3a (patch) | |
tree | 716519d197bc073c17309420ce6da1b2a7d8d9d1 /src/expr | |
parent | 80792d1026600d162f293839615fecdf19665e17 (diff) |
Fix hasSubterm calls for higher-order (#1760)
Diffstat (limited to 'src/expr')
-rw-r--r-- | src/expr/node.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/expr/node.h b/src/expr/node.h index 14630bae1..de14723e6 100644 --- a/src/expr/node.h +++ b/src/expr/node.h @@ -1539,6 +1539,10 @@ bool NodeTemplate<ref_count>::hasSubterm(NodeTemplate<false> t, bool strict) con for (unsigned i = 0; i < toProcess.size(); ++ i) { TNode current = toProcess[i]; + if (current.hasOperator() && current.getOperator() == t) + { + return true; + } for(unsigned j = 0, j_end = current.getNumChildren(); j < j_end; ++ j) { TNode child = current[j]; if (child == t) { |