Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit ca41844

Browse files
rfrankeOpenModelica-Hudson
authored andcommitted
[NF] Evaluate constants in for-equations as well
Belonging to [master]: - #2721 - OpenModelica/OpenModelica-testsuite#1050
1 parent 7819105 commit ca41844

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Compiler/NFFrontEnd/NFEvalConstants.mo

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,13 @@ algorithm
211211
then
212212
Equation.ARRAY_EQUALITY(eq.lhs, e2, ty, eq.source);
213213

214+
case Equation.FOR()
215+
algorithm
216+
eq.range := Util.applyOption(eq.range, evaluateExp);
217+
eq.body := evaluateEquations(eq.body);
218+
then
219+
eq;
220+
214221
case Equation.IF()
215222
algorithm
216223
eq.branches := list(evaluateEqBranch(b) for b in eq.branches);

0 commit comments

Comments
 (0)