vhdlpp: ExpString::emit distinguishes between array and string types.

This commit is contained in:
Maciej Suminski
2016-01-05 13:55:22 +01:00
parent 442750ca2c
commit ef3d0e4e0d
+2 -1
View File
@@ -912,10 +912,11 @@ bool ExpString::is_primary(void) const
int ExpString::emit(ostream& out, Entity*ent, ScopeBase*scope)
{
const VTypeArray*arr;
const VType*type = peek_type();
assert(type != 0);
if (const VTypeArray*arr = dynamic_cast<const VTypeArray*>(type)) {
if (type != &primitive_STRING && (arr = dynamic_cast<const VTypeArray*>(type))) {
return emit_as_array_(out, ent, scope, arr);
}