From 38b82fa742251c4179b3fa245dd2aa91f15e2ccd Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sat, 4 Sep 2021 17:59:08 -0700 Subject: [PATCH] const rewriting revisited --- src/ast/rewriter/rewriter_def.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ast/rewriter/rewriter_def.h b/src/ast/rewriter/rewriter_def.h index 7cf62eb8354..11165e611cf 100644 --- a/src/ast/rewriter/rewriter_def.h +++ b/src/ast/rewriter/rewriter_def.h @@ -195,7 +195,9 @@ bool rewriter_tpl::visit(expr * t, unsigned max_depth) { if (process_const(to_app(t))) return true; TRACE("rewriter", tout << "process const: " << mk_bounded_pp(t, m()) << " -> " << mk_bounded_pp(m_r,m()) << "\n";); - t = m_r; + set_new_child_flag(t, m_r); + result_stack().push_back(m_r); + return true; } if (max_depth != RW_UNBOUNDED_DEPTH) max_depth--;