From 23ea833703072f8c2af3935810d12af3c16abf3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sj=C3=B6lund?= Date: Fri, 29 Jan 2010 15:55:52 +0000 Subject: [PATCH] - Fixes bug in codegen of record constructors after PA's changes. git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4887 f25d12d1-65f4-0310-ae8a-bbce733d8d8e --- Compiler/Codegen.mo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Compiler/Codegen.mo b/Compiler/Codegen.mo index 96b9234559a..7ba8177efa4 100644 --- a/Compiler/Codegen.mo +++ b/Compiler/Codegen.mo @@ -1455,9 +1455,10 @@ algorithm list res,strs,rest_strs,decl_strs,rt,rt_1,rt_2,record_definition,fieldNames; case ((DAE.T_COMPLEX(complexClassType = ClassInf.RECORD(path = name), complexVarLst = varlst),SOME(path)),rt) equation - failure(_ = Util.listGetMember(Absyn.pathString(name),rt)); + s1 = generateFunctionName(name); + failure(_ = Util.listGetMember(s1,rt)); - first_str = "struct "+&generateFunctionName(name)+&" {"; + first_str = "struct "+&s1+&" {"; decl_strs = Util.listMap(varlst, generateVarDeclaration); last_str = "};"; s1 = generateFunctionName(name);