From c06dba73e1087afb41b087519b7e43119bb8b85e Mon Sep 17 00:00:00 2001 From: Botond Baranyi <botond.baranyi@ericsson.com> Date: Fri, 11 Sep 2020 16:39:56 +0200 Subject: [PATCH] OOP: fixed code generated for aliases of class types (bug 563718) Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com> Change-Id: I1df08d1b47422a1143790d91d70a1ad21dcd7fb3 --- compiler2/Type_codegen.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler2/Type_codegen.cc b/compiler2/Type_codegen.cc index 9f4e9659f..83591376c 100644 --- a/compiler2/Type_codegen.cc +++ b/compiler2/Type_codegen.cc @@ -1247,6 +1247,13 @@ void Type::generate_code_alias(output_struct *target) "typedef %s_template %s_template;\n", refd_name, own_name); break; + case T_CLASS: { + Ttcn::ClassTypeBody* class_ = t_last->get_class_type_body(); + target->header.typedefs = mputprintf(target->header.typedefs, + "typedef %s %s;\n", + class_->is_built_in() ? "OBJECT" : t_last->get_genname_own(my_scope).c_str(), + own_name); + break; } default: // value and template classes exist target->header.typedefs = mputprintf(target->header.typedefs, #ifndef NDEBUG -- GitLab