Skip to content

Commit

Permalink
- Fixed constant evaluation of for iterators.
Browse files Browse the repository at this point in the history
- Added test case ForIf.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5876 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Jul 22, 2010
1 parent 99ea8af commit 3176b77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/Static.mo
Expand Up @@ -10238,7 +10238,7 @@ algorithm
(cache,e,DAE.C_VAR(),acc);

// a constant -> evaluate binding
case (cache,env,cr,acc,SCode.CONST(),NONE,io,tt,binding,doVect,_)
case (cache,env,cr,acc,SCode.CONST(),_,io,tt,binding,doVect,_)
equation
(cache,v) = Ceval.cevalCrefBinding(cache,env,cr,binding,false,Ceval.MSG());
e = ValuesUtil.valueExp(v);
Expand All @@ -10248,7 +10248,7 @@ algorithm
(cache,e_1,DAE.C_CONST(),SCode.RO());

// a constant with some for iterator constness -> don't constant evaluate
case (cache,env,cr,acc,SCode.CONST(),SOME(_),io,tt,binding,doVect,_)
case (cache,env,cr,acc,SCode.CONST(),SOME(_),io,tt,_,doVect,_)
equation
expTy = Types.elabType(tt);
then
Expand Down

0 comments on commit 3176b77

Please sign in to comment.