Skip to content

Commit 5f42fb7

Browse files
committed
replication_exprt constructor requires the expression type
replication_exprt concatenates a given bitvector 'n' times, where 'n' is a constant. In general, the expression does not have the type of the first operand, and thus, the constructor requires the type of the expression.
1 parent 759d10d commit 5f42fb7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/util/bitvector_expr.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,12 @@ inline extractbits_exprt &to_extractbits_expr(exprt &expr)
517517
class replication_exprt : public binary_exprt
518518
{
519519
public:
520-
replication_exprt(const constant_exprt &_times, const exprt &_src)
521-
: binary_exprt(_times, ID_replication, _src)
520+
replication_exprt(constant_exprt _times, exprt _src, typet _type)
521+
: binary_exprt(
522+
std::move(_times),
523+
ID_replication,
524+
std::move(_src),
525+
std::move(_type))
522526
{
523527
}
524528

0 commit comments

Comments
 (0)