Skip to content

Commit

Permalink
[NF] Fix structural analysis of if-condition.
Browse files Browse the repository at this point in the history
- Remove marking of conditions in if-equations as structural during the
  instantiation, it can't be done correctly at that point and is already
  done correctly during the typing anyway.

Belonging to [master]:
  - #150
  - OpenModelica/OMCompiler#3060
  • Loading branch information
perost authored and OpenModelica-Hudson committed Apr 23, 2019
1 parent 22a570f commit 2da4cb3
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Compiler/NFFrontEnd/NFInst.mo
Expand Up @@ -3486,7 +3486,6 @@ algorithm
local
Expression exp;
list<Equation> eql;
Boolean all_params;

case Equation.EQUALITY()
algorithm
Expand All @@ -3511,18 +3510,10 @@ algorithm

case Equation.IF()
algorithm
all_params := true;

for branch in eq.branches loop
() := match branch
case Equation.Branch.BRANCH()
algorithm
if all_params and Expression.variability(branch.condition) == Variability.PARAMETER then
markStructuralParamsExp(branch.condition);
else
all_params := false;
end if;

updateImplicitVariabilityEql(branch.body, inWhen);
then
();
Expand Down

0 comments on commit 2da4cb3

Please sign in to comment.