Skip to content

Commit d337735

Browse files
author
Daniel Kroening
committed
array_of_exprt has array_typet type
1 parent 073dfd4 commit d337735

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/solvers/flattening/boolbv_array_of.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bvt boolbvt::convert_array_of(const array_of_exprt &expr)
1818
DATA_INVARIANT(
1919
expr.type().id() == ID_array, "array_of expression shall have array type");
2020

21-
const array_typet &array_type=to_array_type(expr.type());
21+
const array_typet &array_type = expr.type();
2222

2323
if(is_unbounded_array(array_type))
2424
return conversion_failed(expr);

src/util/std_expr.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,6 +1580,16 @@ class array_of_exprt:public unary_exprt
15801580
{
15811581
}
15821582

1583+
const array_typet &type() const
1584+
{
1585+
return static_cast<const array_typet &>(unary_exprt::type());
1586+
}
1587+
1588+
array_typet &type()
1589+
{
1590+
return static_cast<array_typet &>(unary_exprt::type());
1591+
}
1592+
15831593
exprt &what()
15841594
{
15851595
return op0();

0 commit comments

Comments
 (0)