Skip to content

Commit

Permalink
[NF] Remove empty arrays equations.
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#2527
  • Loading branch information
perost authored and OpenModelica-Hudson committed Jun 25, 2018
1 parent 24b68a2 commit 6fe40c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Compiler/NFFrontEnd/NFSimplifyModel.mo
Expand Up @@ -131,9 +131,12 @@ algorithm

case Equation.ARRAY_EQUALITY()
algorithm
eq.rhs := removeEmptyFunctionArguments(SimplifyExp.simplify(eq.rhs));
if not Type.isEmptyArray(eq.ty) then
eq.rhs := removeEmptyFunctionArguments(SimplifyExp.simplify(eq.rhs));
equations := eq :: equations;
end if;
then
eq :: equations;
equations;

case Equation.IF()
then simplifyIfEqBranches(eq.branches, eq.source, equations);
Expand Down

0 comments on commit 6fe40c2

Please sign in to comment.