Opened 16 years ago
Last modified 13 years ago
#1106 closed defect (invalid)
Array modifications in class inheritance are not instantiated
| Reported by: | AlexeyLebedev | Owned by: | AlexeyLebedev |
|---|---|---|---|
| Priority: | high | Milestone: | 1.9.0 |
| Component: | Frontend | Version: | |
| Keywords: | Cc: | AlexeyLebedev |
Description (last modified by )
Consider the following example:
model Test
class C
parameter Real r;
parameter Real[1] ra;
end C;
C c(r=0.1, ra[1]=0.2);
class C1
extends C(r=0.1, ra[1]=0.2);
end C1;
C1 c1;
end Test;
It is translated into the following:
fclass Test parameter Real c.r = 0.1; parameter Real c.ra[1] = 0.2; parameter Real c1.r = 0.1; parameter Real c1.ra[1]; end Test;
I.e., the modification ra[1]=0.2 is not instantiated for C1, though it is instantiated correctly for c. The modification r=0.1 is instatiated correctly both for C1 and c. It does not depend on whether r and ra are declared parameters or not.
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
| Cc: | AlexeyLebedev, → AlexeyLebedev |
|---|---|
| Component: | Instantiation → Frontend |
| Description: | modified (diff) |
| Milestone: | → 1.9.0 |
Note:
See TracTickets
for help on using tickets.

Array modifications are no longer supported by OMC since they were removed from the Modelica specification, so this issue no longer matters.