Opened 15 years ago
Closed 10 years ago
#1197 closed defect (worksforme)
Lookup issues of inherited constants in packages
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Instantiation | Version: | 1.5.0RC2 |
Keywords: | Cc: | Martin Sjölund, Per Östlund |
Description
lookupVarInPackages sends SOME(t3) to instClass. This filters out t1, but not t2 (because it filters before extends is run).
One solutions is to make partialInstClass instead (only constants may be looked up anyway). If this is done, a separate case needs to be added for enumerations.
Another would be to send NONE() as instSingleCref.
A third would be to fix instSingleCref for extends (do filtering after extends).
Needs to be the fastest solution.
{{{model P
package A
extends B(t2=t1);
constant Real t1=1;
end A;
package B
constant Real t2=2;
constant Real t3 = 3;
end B;
parameter Real x = A.t3;
end P;}}}