From ef3d0e4e0db3de9cfe53f9ebc1b1e7f54d1fc465 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 4 Dec 2015 17:45:20 +0100 Subject: [PATCH] vhdlpp: ExpString::emit distinguishes between array and string types. --- vhdlpp/expression_emit.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vhdlpp/expression_emit.cc b/vhdlpp/expression_emit.cc index 67104e13c..7e4abb504 100644 --- a/vhdlpp/expression_emit.cc +++ b/vhdlpp/expression_emit.cc @@ -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(type)) { + if (type != &primitive_STRING && (arr = dynamic_cast(type))) { return emit_as_array_(out, ent, scope, arr); }