Skip to content

Commit

Permalink
[NF] Fix Package.collectVariableConstants.
Browse files Browse the repository at this point in the history
- Make Package.collectVariableConstants handle generated record
  bindings correctly.

Belonging to [master]:
  - OpenModelica/OMCompiler#2477
  • Loading branch information
perost authored and OpenModelica-Hudson committed May 28, 2018
1 parent a444419 commit 12e54e0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Compiler/NFFrontEnd/NFPackage.mo
Expand Up @@ -114,9 +114,7 @@ public
input Variable var;
input output Constants constants;
algorithm
if Binding.isBound(var.binding) then
constants := collectExpConstants(Binding.getTypedExp(var.binding), constants);
end if;
constants := collectBindingConstants(var.binding, constants);

// TODO: The component's attributes (i.e. start, etc) might also contain
// package constants.
Expand All @@ -126,7 +124,7 @@ public
input Binding binding;
input output Constants constants;
algorithm
if Binding.isBound(binding) then
if Binding.isExplicitlyBound(binding) then
constants := collectExpConstants(Binding.getTypedExp(binding), constants);
end if;
end collectBindingConstants;
Expand Down

0 comments on commit 12e54e0

Please sign in to comment.