Skip to content

Commit

Permalink
[NF] Evaluate constants in for-equations as well
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke authored and OpenModelica-Hudson committed Oct 13, 2018
1 parent 7819105 commit ca41844
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Compiler/NFFrontEnd/NFEvalConstants.mo
Expand Up @@ -211,6 +211,13 @@ algorithm
then
Equation.ARRAY_EQUALITY(eq.lhs, e2, ty, eq.source);

case Equation.FOR()
algorithm
eq.range := Util.applyOption(eq.range, evaluateExp);
eq.body := evaluateEquations(eq.body);
then
eq;

case Equation.IF()
algorithm
eq.branches := list(evaluateEqBranch(b) for b in eq.branches);
Expand Down

0 comments on commit ca41844

Please sign in to comment.