Skip to content

Commit

Permalink
[NF] Disable evaluation of final parameters.
Browse files Browse the repository at this point in the history
- Disable the evaluation of non-structural final parameters, since doing
  so causes too many issues currently.

Belonging to [master]:
  - OpenModelica/OMCompiler#2991
  - OpenModelica/OpenModelica-testsuite#1145
  • Loading branch information
perost authored and OpenModelica-Hudson committed Mar 22, 2019
1 parent 3b38d7b commit d85a258
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Compiler/NFFrontEnd/NFInst.mo
Expand Up @@ -3263,15 +3263,15 @@ algorithm
// All other parameters are considered structural in this case.
isStructural := true;
end if;
elseif Component.isFinal(component) and Component.getFixedAttribute(component) then
// If a parameter is fixed and final we might also want to evaluate it,
// since its binding can't be modified. But only if all parameters it
// depends on are also fixed and final.
if Binding.isUnbound(compBinding) or isBindingNotFixed(compBinding, requireFinal = true) then
isStructural := false;
else
isStructural := true;
end if;
//elseif Component.isFinal(component) and Component.getFixedAttribute(component) then
// // If a parameter is fixed and final we might also want to evaluate it,
// // since its binding can't be modified. But only if all parameters it
// // depends on are also fixed and final.
// if Binding.isUnbound(compBinding) or isBindingNotFixed(compBinding, requireFinal = true) then
// isStructural := false;
// else
// isStructural := true;
// end if;
else
isStructural := false;
end if;
Expand Down

0 comments on commit d85a258

Please sign in to comment.