Skip to content

Commit f37741f

Browse files
committed
Expression simplification must not alter the type
1 parent d180233 commit f37741f

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"
@@ -2403,6 +2404,7 @@ bool simplify_exprt::simplify_rec(exprt &expr)
24032404

24042405
if(!result)
24052406
{
2407+
POSTCONDITION(tmp.type() == expr.type());
24062408
expr.swap(tmp);
24072409

24082410
#ifdef USE_CACHE

0 commit comments

Comments
 (0)