Skip to content

Commit

Permalink
add extra information for type error message
Browse files Browse the repository at this point in the history
a recent opened and closed bug report was due to an error of taking bit-wise or between two bit-vectors of different size. The error message was not understood by the user. Adding a little extra generic information to see if it helps.
  • Loading branch information
NikolajBjorner committed Aug 29, 2022
1 parent dd91fab commit 9922c76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ast/bv_decl_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ func_decl * bv_decl_plugin::mk_func_decl(decl_kind k, unsigned num_parameters, p
for (unsigned i = 0; i < num_args; ++i) {
if (args[i]->get_sort() != r->get_domain(i)) {
std::ostringstream buffer;
buffer << "Argument " << mk_pp(args[i], m) << " at position " << i << " does not match declaration " << mk_pp(r, m);
buffer << "Argument " << mk_pp(args[i], m) << " at position " << i << " has sort " << mk_pp(args[i]->get_sort(), m) << " it does does not match declaration " << mk_pp(r, m);
m.raise_exception(buffer.str());
return nullptr;
}
Expand Down

0 comments on commit 9922c76

Please sign in to comment.