Skip to content

Commit fa1197a

Browse files
fix #4155
1 parent 815fedd commit fa1197a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/ast/recfun_decl_plugin.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,12 @@ namespace recfun {
236236
//<! add a function declaration
237237
def * decl_fun(symbol const & s, unsigned n_args, sort *const * args, sort * range, bool is_generated);
238238

239+
bool has_def(func_decl* f) const {
240+
return m_plugin->has_def(f);
241+
}
242+
239243
def& get_def(func_decl* f) {
240-
SASSERT(m_plugin->has_def(f));
244+
SASSERT(has_def(f));
241245
return m_plugin->get_def(f);
242246
}
243247

src/ast/rewriter/recfun_rewriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ br_status recfun_rewriter::mk_app_core(func_decl * f, unsigned num_args, expr *
2626
if (!m.is_value(args[i]))
2727
return BR_FAILED;
2828
}
29+
if (!m_rec.has_def(f))
30+
return BR_FAILED;
2931
recfun::def const& d = m_rec.get_def(f);
3032
if (!d.get_rhs())
3133
return BR_FAILED;

0 commit comments

Comments
 (0)