File tree 1 file changed +10
-2
lines changed 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,12 @@ void replace_symbolt::insert(
25
25
const symbol_exprt &old_expr,
26
26
const exprt &new_expr)
27
27
{
28
- PRECONDITION (old_expr.type () == new_expr.type ());
28
+ PRECONDITION_WITH_DIAGNOSTICS (
29
+ old_expr.type () == new_expr.type (),
30
+ " types to be replaced should match. old type:\n " ,
31
+ old_expr.type ().pretty (),
32
+ " \n new.type:" ,
33
+ new_expr.type ().pretty ());
29
34
expr_map.insert (std::pair<irep_idt, exprt>(
30
35
old_expr.get_identifier (), new_expr));
31
36
}
@@ -46,7 +51,10 @@ bool replace_symbolt::replace_symbol_expr(symbol_exprt &s) const
46
51
47
52
DATA_INVARIANT (
48
53
s.type () == it->second .type (),
49
- " type of symbol to be replaced should match" );
54
+ " types to be replaced should match. s.type:" ,
55
+ s.type ().pretty (),
56
+ " \n it->second.type:" ,
57
+ it->second .type ().pretty ());
50
58
static_cast <exprt &>(s) = it->second ;
51
59
52
60
return false ;
You can’t perform that action at this time.
0 commit comments