Opened 13 years ago
Closed 8 years ago
#1790 closed defect (fixed)
Component redeclarations does not inherit array dimensions.
| Reported by: | Owned by: | Per Östlund | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.13.0 | 
| Component: | New Instantiation | Version: | |
| Keywords: | Cc: | 
Description
Redeclaring a component should inherit the original array dimensions (and array dimension sizes) of the original declaration if no array dimensions are specified in the redeclaration.
Given:
model M1 replaceable Real r[3]; end M1; model M2 extends M1(redeclare Real r); end M2;
instantiateModel(M1) and instantiateModel(M2) should produce the same result for r, but the array dimension is missing in M2.
instantiateModel(M1):
class M1 Real r[1]; Real r[2]; Real r[3]; end M1;
instantiateModel(M2):
class M2 Real r; end M2;
Change History (4)
comment:1 by , 13 years ago
| Milestone: | 1.9.0 → Future | 
|---|---|
| Owner: | changed from to | 
| Status: | new → assigned | 
comment:2 by , 8 years ago
| Component: | Frontend → New Instantiation | 
|---|
As of v1.13.0-dev-148-g3532b10, the "old" front end produces the correct result, while the "new" front end loses the dimension of r[3] again.
comment:3 by , 8 years ago
| Milestone: | Future → 2.0.0 | 
|---|
comment:4 by , 8 years ago
| Milestone: | 2.0.0 → 1.13.0 | 
|---|---|
| Resolution: | → fixed | 
| Status: | assigned → closed | 
Now also the new front end behaves correctly. Since both front-ends wok fine, I am closing this ticket for 1.13.0 

Works with the new instantiation, and will not work until then.