diff --git a/vhdlpp/expression_elaborate.cc b/vhdlpp/expression_elaborate.cc index 70fedaca4..b27deeff3 100644 --- a/vhdlpp/expression_elaborate.cc +++ b/vhdlpp/expression_elaborate.cc @@ -594,6 +594,10 @@ const VType*ExpBitstring::fit_type(Entity*, ScopeBase*, const VTypeArray*atype) int ExpBitstring::elaborate_expr(Entity*, ScopeBase*, const VType*) { int errors = 0; + std::vector range; + range.push_back(VTypeArray::range_t(new ExpInteger(value_.size() - 1), new ExpInteger(0))); + const VTypeArray*type = new VTypeArray(&primitive_STDLOGIC, range); + set_type(type); return errors; }