File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,20 @@ Author: Daniel Kroening, kroening@kroening.com
1212#include < util/base_type.h>
1313#include < util/invariant.h>
1414
15+ #include " bv_conversion_exceptions.h"
1516#include " flatten_byte_operators.h"
1617
1718literalt boolbvt::convert_equality (const equal_exprt &expr)
1819{
1920 const bool is_base_type_eq =
2021 base_type_eq (expr.lhs ().type (), expr.rhs ().type (), ns);
21- DATA_INVARIANT (
22- is_base_type_eq,
23- std::string (" equality without matching types:\n " ) + " ######### lhs: " +
24- expr.lhs ().pretty () + ' \n ' + " ######### rhs: " + expr.rhs ().pretty ());
22+ if (!is_base_type_eq)
23+ {
24+ const std::string error_msg =
25+ std::string (" equality without matching types:\n " ) + " ######### lhs: " +
26+ expr.lhs ().pretty () + ' \n ' + " ######### rhs: " + expr.rhs ().pretty ();
27+ throw bitvector_conversion_exceptiont (error_msg, expr);
28+ }
2529
2630 // see if it is an unbounded array
2731 if (is_unbounded_array (expr.lhs ().type ()))
You can’t perform that action at this time.
0 commit comments