Skip to content

Commit 640d169

Browse files
committed
Expression simplification must not alter the type
1 parent c29d87f commit 640d169

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/simplify_expr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Author: Daniel Kroening, kroening@kroening.com
1212
#include <algorithm>
1313

1414
#include "c_types.h"
15+
#include "invariant.h"
1516
#include "rational.h"
1617
#include "simplify_expr_class.h"
1718
#include "mp_arith.h"
@@ -2415,6 +2416,7 @@ bool simplify_exprt::simplify_rec(exprt &expr)
24152416

24162417
if(!result)
24172418
{
2419+
POSTCONDITION(tmp.type() == expr.type());
24182420
expr.swap(tmp);
24192421

24202422
#ifdef USE_CACHE

0 commit comments

Comments
 (0)