Opened 12 years ago

Closed 11 years ago

Last modified 7 years ago

#1904 closed defect (fixed)

Move handling of package constants entirely to SCodeInst

Reported by: Per Östlund Owned by: Per Östlund
Priority: high Milestone: 1.9.4
Component: New Instantiation Version: trunk
Keywords: Cc:

Description

Right now we use SCodeDependency to find all package constants. This doesn't quite work as intended, and introduces unnecessary dependencies between the modules. We should instead move that part to SCodeInst. We need to either go through all the classes and instantiate any package constants we find, or collect them as we go along (perhaps use the symbol table?). We also need to instantiate package constants inside components, e.g.:

model A
  package P
    constant Integer i = 0;
  end P;

  Integer x = P.i;
end A;

model B
  A a(P(i = 3));
end B;

In this case we need to instantiate a.P.i.

Change History (3)

comment:1 by Per Östlund, 11 years ago

Resolution: fixed
Status: newclosed

comment:2 by Dietmar Winkler, 9 years ago

Milestone: Futurepre1.9.4

It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.

comment:3 by Martin Sjölund, 7 years ago

Milestone: pre1.9.41.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.