Skip to content

Commit

Permalink
- bugfix inlining records
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5692 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jun 18, 2010
1 parent 8306ce5 commit 323186a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Compiler/Inline.mo
Expand Up @@ -981,7 +981,7 @@ algorithm
case ({}) then {};
case((c,e as (DAE.CREF(componentRef = cref)))::res)
equation
true = Exp.isRecord(cref);
// true = Exp.isRecord(cref);
DAE.ET_COMPLEX(varLst=varLst) = Exp.typeof(e);
new = Util.listMap2(varLst,extendCrefRecords1,c,cref);
res1 = extendCrefRecords(res);
Expand Down Expand Up @@ -1009,10 +1009,12 @@ algorithm
DAE.ExpType identType,eidentType,tp;
list<DAE.Subscript> subscriptLst,esubscriptLst;
String name;
case(DAE.COMPLEX_VAR(name=name,tp=tp),DAE.CREF_IDENT(ident=ident,identType=identType,subscriptLst=subscriptLst),
DAE.CREF_IDENT(ident=eident,identType=eidentType,subscriptLst=esubscriptLst))
then ((DAE.CREF_QUAL(ident,identType,subscriptLst,DAE.CREF_IDENT(name,tp,{})),
DAE.CREF(DAE.CREF_QUAL(eident,eidentType,esubscriptLst,DAE.CREF_IDENT(name,tp,{})),tp)));
DAE.ComponentRef c1,e1;
case(DAE.COMPLEX_VAR(name=name,tp=tp),c,e)
equation
c1 = Exp.extendCref(c,tp,name,{});
e1 = Exp.extendCref(e,tp,name,{});
then ((c1,DAE.CREF(e1,tp)));
case(_,_,_)
equation
Debug.fprintln("failtrace","Inline.extendCrefRecords1 failed");
Expand Down

0 comments on commit 323186a

Please sign in to comment.