Skip to content

Commit

Permalink
- check if protected variables have record or array type, thous are n…
Browse files Browse the repository at this point in the history
…ot supported by VarTransform

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14681 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jan 6, 2013
1 parent dc09a61 commit fecb58b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Compiler/FrontEnd/Inline.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,7 @@ algorithm
list<DAE.Element> rest;
VarTransform.VariableReplacements repl;
Option<DAE.Exp> binding;
DAE.Type tp;
case ({},_,_,_,_) then (listReverse(iInputs),listReverse(iOutput),iBody,iRepl);
case (DAE.VAR(componentRef=cr,direction=DAE.INPUT())::rest,_,_,_,_)
equation
Expand All @@ -1640,8 +1641,10 @@ algorithm
(oInputs,oOutput,oBody,repl) = getFunctionInputsOutputBody(rest,iInputs,cr::iOutput,iBody,iRepl);
then
(oInputs,oOutput,oBody,repl);
case (DAE.VAR(componentRef=cr,protection=DAE.PROTECTED(),binding=binding)::rest,_,_,_,_)
case (DAE.VAR(componentRef=cr,protection=DAE.PROTECTED(),ty=tp,binding=binding)::rest,_,_,_,_)
equation
false = Expression.isArrayType(tp);
false = Expression.isRecordType(tp);
repl = addOptBindingReplacements(cr,binding,iRepl);
(oInputs,oOutput,oBody,repl) = getFunctionInputsOutputBody(rest,iInputs,iOutput,iBody,repl);
then
Expand Down

0 comments on commit fecb58b

Please sign in to comment.