Skip to content

Commit

Permalink
- Added rule exp[] => exp (ASUB'ing nothing does nothing)
Browse files Browse the repository at this point in the history
  Finds diff like the following for Modelica.Media
    - 190.56[],0.01604246[],9.86e-05[],0.011[],0.0[]
    + 190.56,0.01604246,0.0000986,0.011,0.0


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11205 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Feb 25, 2012
1 parent 8e46ab3 commit a963de4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Compiler/FrontEnd/ExpressionSimplify.mo
Expand Up @@ -208,6 +208,10 @@ algorithm
then
((e,true));

// Subscripting without subscripting is the identity function
case ((DAE.ASUB(exp = e,sub = {}),_))
then ((e,true));

// unary operations
case (((exp as DAE.UNARY(operator = op,exp = e1)),_))
equation
Expand Down

0 comments on commit a963de4

Please sign in to comment.