Skip to content

Commit

Permalink
- bugfix for pre(ASUB(..))
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13610 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Oct 24, 2012
1 parent 99852c8 commit 1833658
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Compiler/FrontEnd/ExpressionSimplify.mo
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,12 @@ algorithm
then
((e,(b,options)));

case ((DAE.CALL(path=Absyn.IDENT("pre"), expLst={e as DAE.ASUB(exp = exp)}), (b, options)))
case ((e1 as DAE.CALL(path=Absyn.IDENT("pre"), expLst={e as DAE.ASUB(exp = exp)}), (b, options)))
equation
true = Expression.isConst(exp);
b2 = Expression.isConst(exp);
e1 = Util.if_(b2,e,e1);
then
((e,(true,options)));
((e1,(b or b2,options)));

// move pre inside
case ((DAE.CALL(path=Absyn.IDENT("pre"), expLst={e}), (b, options)))
Expand Down

0 comments on commit 1833658

Please sign in to comment.