Skip to content

Commit

Permalink
- avoid Warning Alias Variable ... by improvement of expressionEqual
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13548 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Oct 22, 2012
1 parent 55607d0 commit b9a2ad2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -6820,7 +6820,23 @@ algorithm
case (_,_,_,false) then false;
case (_,_,true,_) then true;
case (DAE.ICONST(integer = i1),DAE.ICONST(integer = i2),_,_) then (i1 == i2);
case (DAE.UNARY(DAE.UMINUS(_),exp=DAE.ICONST(integer = i1)),DAE.ICONST(integer = i2),_,_)
equation
i1 = - i1;
then (i1 == i2);
case (DAE.ICONST(integer = i1),DAE.UNARY(DAE.UMINUS(_),exp=DAE.ICONST(integer = i2)),_,_)
equation
i2 = - i2;
then (i1 == i2);
case (DAE.RCONST(real = r1),DAE.RCONST(real = r2),_,_) then (r1 ==. r2);
case (DAE.UNARY(DAE.UMINUS(_),exp=DAE.RCONST(real = r1)),DAE.RCONST(real = r2),_,_)
equation
r1 = -. r1;
then (r1 ==. r2);
case (DAE.RCONST(real = r1),DAE.UNARY(DAE.UMINUS(_),exp=DAE.RCONST(real = r2)),_,_)
equation
r2 = -. r2;
then (r1 ==. r2);
case (DAE.SCONST(string = s1),DAE.SCONST(string = s2),_,_) then stringEq(s1, s2);
case (DAE.BCONST(bool = b1),DAE.BCONST(bool = b2),_,_) then boolEq(b1, b2);
case (DAE.ENUM_LITERAL(name = enum1), DAE.ENUM_LITERAL(name = enum2),_,_) then Absyn.pathEqual(enum1, enum2);
Expand Down

0 comments on commit b9a2ad2

Please sign in to comment.