Skip to content

Commit ceeb07c

Browse files
tautschnigDaniel Kroening
authored and
Daniel Kroening
committed
Fix use of as_const in std_expr
Using as_const() on op() is too late, as op() itself would already perform non-const operations. This is a fix-up to c267421.
1 parent 7d88715 commit ceeb07c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/std_expr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3168,7 +3168,7 @@ class not_exprt:public unary_exprt
31683168
public:
31693169
explicit not_exprt(exprt _op) : unary_exprt(ID_not, std::move(_op))
31703170
{
3171-
PRECONDITION(as_const(op()).type().id() == ID_bool);
3171+
PRECONDITION(as_const(*this).op().type().id() == ID_bool);
31723172
}
31733173

31743174
DEPRECATED("use not_exprt(op) instead")

0 commit comments

Comments
 (0)