mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
parent
626380b3c7
commit
84af521514
5 changed files with 17 additions and 3 deletions
|
@ -137,7 +137,7 @@ extern "C" {
|
|||
ast_manager& m = mk_c(c)->m();
|
||||
recfun::decl::plugin& p = mk_c(c)->recfun().get_plugin();
|
||||
if (!p.has_def(d)) {
|
||||
std::string msg = "function " + mk_pp(d, m) + " needs to be defined using rec_func_decl";
|
||||
std::string msg = "function " + mk_pp(d, m) + " needs to be declared using rec_func_decl";
|
||||
SET_ERROR_CODE(Z3_INVALID_ARG, msg.c_str());
|
||||
return;
|
||||
}
|
||||
|
@ -158,6 +158,12 @@ extern "C" {
|
|||
SET_ERROR_CODE(Z3_INVALID_ARG, nullptr);
|
||||
return;
|
||||
}
|
||||
if (!pd.get_def()->get_cases().empty()) {
|
||||
std::string msg = "function " + mk_pp(d, m) + " has already been given a definition";
|
||||
SET_ERROR_CODE(Z3_INVALID_ARG, msg.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (abs_body->get_sort() != d->get_range()) {
|
||||
SET_ERROR_CODE(Z3_INVALID_ARG, nullptr);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue