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

This commit is contained in:
Maciej Suminski 2015-12-04 17:45:20 +01:00
parent 442750ca2c
commit ef3d0e4e0d
1 changed files with 2 additions and 1 deletions

View File

@ -912,10 +912,11 @@ bool ExpString::is_primary(void) const
int ExpString::emit(ostream& out, Entity*ent, ScopeBase*scope) int ExpString::emit(ostream& out, Entity*ent, ScopeBase*scope)
{ {
const VTypeArray*arr;
const VType*type = peek_type(); const VType*type = peek_type();
assert(type != 0); 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); return emit_as_array_(out, ent, scope, arr);
} }