Skip to content

Commit bb51212

Browse files
author
Daniel Kroening
committed
new array_typet interface
1 parent c084a5b commit bb51212

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/verilog/verilog_typecheck_type.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ void verilog_typecheck_exprt::convert_type(
6666
else
6767
{
6868
// we have a genuine array, and do a recursive call
69-
dest=array_typet();
70-
dest.set(ID_size, from_integer(width, integer_typet()));
69+
typet array_subtype;
70+
convert_type(subtype, array_subtype);
71+
exprt size=from_integer(width, integer_typet());
72+
dest=array_typet(array_subtype, size);
7173
dest.add_source_location()=
7274
static_cast<const source_locationt &>(src.find(ID_C_source_location));
7375
dest.set(ID_offset, from_integer(offset, integer_typet()));
74-
convert_type(subtype, dest.subtype());
7576
}
7677
}
7778
else

0 commit comments

Comments
 (0)