Skip to content

Commit

Permalink
fix for ticket:5054
Browse files Browse the repository at this point in the history
- proper prefixing (subscript transfer) of condition in Equation.IF

Belonging to [master]:
  - OpenModelica/OMCompiler#2591
  - OpenModelica/OpenModelica-testsuite#1007
  • Loading branch information
adrpo authored and OpenModelica-Hudson committed Aug 6, 2018
1 parent 9ebd34b commit 8c3db21
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Compiler/NFFrontEnd/NFFlatten.mo
Expand Up @@ -778,6 +778,9 @@ algorithm
bl := match b
case Equation.Branch.BRANCH(cond, var, eql)
algorithm
// flatten the condition first
cond := flattenExp(cond, prefix);
// flatten the equations
eql := flattenEquations(eql, prefix);

if Expression.isTrue(cond) and listEmpty(bl) then
Expand Down

0 comments on commit 8c3db21

Please sign in to comment.