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

Commit 8c3db21

Browse files
adrpoOpenModelica-Hudson
authored andcommitted
fix for ticket:5054
- proper prefixing (subscript transfer) of condition in Equation.IF Belonging to [master]: - #2591 - OpenModelica/OpenModelica-testsuite#1007
1 parent 9ebd34b commit 8c3db21

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Compiler/NFFrontEnd/NFFlatten.mo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,9 @@ algorithm
778778
bl := match b
779779
case Equation.Branch.BRANCH(cond, var, eql)
780780
algorithm
781+
// flatten the condition first
782+
cond := flattenExp(cond, prefix);
783+
// flatten the equations
781784
eql := flattenEquations(eql, prefix);
782785

783786
if Expression.isTrue(cond) and listEmpty(bl) then

0 commit comments

Comments
 (0)