diff --git a/vhdlpp/expression_emit.cc b/vhdlpp/expression_emit.cc index 7e4abb504..41436a933 100644 --- a/vhdlpp/expression_emit.cc +++ b/vhdlpp/expression_emit.cc @@ -453,17 +453,16 @@ int ExpCharacter::emit_primitive_bit_(ostream&out, Entity*, ScopeBase*, int ExpCharacter::emit(ostream&out, Entity*ent, ScopeBase*scope) { const VType*etype = peek_type(); + const VTypeArray*array; + + if (etype != &primitive_CHARACTER && (array = dynamic_cast(etype))) { + etype = array->element_type(); + } if (const VTypePrimitive*use_type = dynamic_cast(etype)) { return emit_primitive_bit_(out, ent, scope, use_type); } - if (const VTypeArray*array = dynamic_cast(etype)) { - if (const VTypePrimitive*use_type = dynamic_cast(array->element_type())) { - return emit_primitive_bit_(out, ent, scope, use_type); - } - } - out << "\"" << value_ << "\""; return 0; }