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
12
#include < util/base_type.h>
13
13
#include < util/invariant.h>
14
14
15
+ #include " bv_conversion_exceptions.h"
15
16
#include " flatten_byte_operators.h"
16
17
17
18
literalt boolbvt::convert_equality (const equal_exprt &expr)
18
19
{
19
20
const bool is_base_type_eq =
20
21
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
+ }
25
29
26
30
// see if it is an unbounded array
27
31
if (is_unbounded_array (expr.lhs ().type ()))
You can’t perform that action at this time.
0 commit comments