Skip to content

Commit

Permalink
-Fixed small bug in simplification of if-expressions.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/branches/MathCoreOSMC@4081 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Jun 12, 2009
1 parent dfb92aa commit 90e5afd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/Exp.mo
Expand Up @@ -2162,7 +2162,7 @@ algorithm

case(CAST(tp,IFEXP(cond,e1,e2))) equation
e1_1 = simplify1(CAST(tp,e1));
e2_1 = simplify1(CAST(tp,e2));
e2_1 = simplify1(CAST(tp,e2));
then IFEXP(cond,e1_1,e2_1);

case (CAST(ty = tp,exp = e))
Expand Down Expand Up @@ -2324,7 +2324,7 @@ algorithm
e1_1 = simplify1(e1);
e2_1 = simplify1(e2);
e3_1 = simplify1(e3);
remove_if = expEqual(e2, e3);
remove_if = expEqual(e2_1, e3_1);
res = Util.if_(remove_if, e2_1, IFEXP(e1,e2_1,e3_1));
then
res;
Expand Down

0 comments on commit 90e5afd

Please sign in to comment.