diff --git a/elab_type.cc b/elab_type.cc index 413e6f61c..48dd1dcbd 100644 --- a/elab_type.cc +++ b/elab_type.cc @@ -168,7 +168,8 @@ ivl_type_t parray_type_t::elaborate_type_raw(Design*des, NetScope*scope) const if (dims.get()) evaluate_ranges(des, scope, this, packed, *dims); - if (base_type->figure_packed_base_type() == IVL_VT_NO_TYPE) { + ivl_type_t etype = base_type->elaborate_type(des, scope); + if (!etype->packed()) { cerr << this->get_fileline() << " error: Packed array "; if (!name.nil()) cerr << "`" << name << "` "; @@ -180,7 +181,6 @@ ivl_type_t parray_type_t::elaborate_type_raw(Design*des, NetScope*scope) const cerr << "` is not packed." << endl; des->errors++; } - ivl_type_t etype = base_type->elaborate_type(des, scope); return new netparray_t(packed, etype); }