Opened 16 years ago
Last modified 13 years ago
#1106 closed defect (invalid)
Array modifications in class inheritance are not instantiated — at Initial Version
Reported by: | AlexeyLebedev | Owned by: | AlexeyLebedev |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | Frontend | Version: | |
Keywords: | Cc: | AlexeyLebedev |
Description
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.