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

Commit 12e54e0

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Fix Package.collectVariableConstants.
- Make Package.collectVariableConstants handle generated record bindings correctly. Belonging to [master]: - #2477
1 parent a444419 commit 12e54e0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Compiler/NFFrontEnd/NFPackage.mo

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ public
114114
input Variable var;
115115
input output Constants constants;
116116
algorithm
117-
if Binding.isBound(var.binding) then
118-
constants := collectExpConstants(Binding.getTypedExp(var.binding), constants);
119-
end if;
117+
constants := collectBindingConstants(var.binding, constants);
120118

121119
// TODO: The component's attributes (i.e. start, etc) might also contain
122120
// package constants.
@@ -126,7 +124,7 @@ public
126124
input Binding binding;
127125
input output Constants constants;
128126
algorithm
129-
if Binding.isBound(binding) then
127+
if Binding.isExplicitlyBound(binding) then
130128
constants := collectExpConstants(Binding.getTypedExp(binding), constants);
131129
end if;
132130
end collectBindingConstants;

0 commit comments

Comments
 (0)