Skip to content

Commit 1c8972d

Browse files
author
Daniel Kroening
committed
array_of_exprt has array_typet type
1 parent e133d22 commit 1c8972d

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
@@ -1616,6 +1616,16 @@ class array_of_exprt:public unary_exprt
16161616
{
16171617
}
16181618

1619+
const array_typet &type() const
1620+
{
1621+
return static_cast<const array_typet &>(unary_exprt::type());
1622+
}
1623+
1624+
array_typet &type()
1625+
{
1626+
return static_cast<array_typet &>(unary_exprt::type());
1627+
}
1628+
16191629
exprt &what()
16201630
{
16211631
return op0();

0 commit comments

Comments
 (0)