mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
fix #4317
This commit is contained in:
parent
aaf05f18ab
commit
cd64967706
|
@ -210,7 +210,7 @@ func_decl * func_decls::find(unsigned arity, sort * const * domain, sort * range
|
||||||
if (f->get_domain(i) != domain[i])
|
if (f->get_domain(i) != domain[i])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == arity)
|
if (i == arity || !domain)
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -1512,12 +1512,11 @@ namespace smt2 {
|
||||||
f = m_ctx.find_func_decl(C, 0, nullptr, vars.size(), nullptr, srt);
|
f = m_ctx.find_func_decl(C, 0, nullptr, vars.size(), nullptr, srt);
|
||||||
}
|
}
|
||||||
catch (cmd_exception &) {
|
catch (cmd_exception &) {
|
||||||
if (!args.empty()) {
|
if (!vars.empty()) {
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!f && !vars.empty()) {
|
||||||
if (!f && !args.empty()) {
|
|
||||||
throw parser_exception("expecting a constructor that has been declared");
|
throw parser_exception("expecting a constructor that has been declared");
|
||||||
}
|
}
|
||||||
if (!f) {
|
if (!f) {
|
||||||
|
|
Loading…
Reference in a new issue