Set correct type for indexed array properties
For indexed array properties the type of the expression is the type of the element. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
44bc9cba03
commit
bc3cb04a41
|
|
@ -401,7 +401,13 @@ NetEProperty::NetEProperty(NetNet*net, size_t pidx, NetExpr*idx)
|
|||
ivl_assert(*this, use_type);
|
||||
|
||||
ivl_type_t prop_type = use_type->get_prop_type(pidx_);
|
||||
set_net_type(prop_type);
|
||||
if (idx) {
|
||||
auto array_type = dynamic_cast<const netarray_t*>(prop_type);
|
||||
ivl_assert(*this, array_type);
|
||||
set_net_type(array_type->element_type());
|
||||
} else {
|
||||
set_net_type(prop_type);
|
||||
}
|
||||
}
|
||||
|
||||
NetEProperty::~NetEProperty()
|
||||
|
|
|
|||
Loading…
Reference in New Issue