Opened 11 years ago
Closed 11 years ago
#2784 closed defect (fixed)
Lost parameter value with replaceable/redeclare
| Reported by: | Henrik Tidefelt | Owned by: | somebody |
|---|---|---|---|
| Priority: | high | Milestone: | 1.9.1 |
| Component: | Frontend | Version: | trunk |
| Keywords: | Cc: |
Description
Repeating the model in #1060, but without making the parameter protected:
class C1 replaceable parameter Real r=3.14; end C1; model C2 replaceable parameter C1 x1(redeclare replaceable Real r=3); end C2;
This should be valid, and simulating C2 should result in the parameter x1.r having the value 3.
However, the parameter value is lost when instantiating C2:
class C2 parameter Real x1.r; end C2;
Change History (2)
comment:1 by , 11 years ago
| Component: | New Instantiation → Frontend |
|---|---|
| Owner: | changed from to |
comment:2 by , 11 years ago
| Milestone: | Future → 1.9.1 |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Fixed in r22600 (well, earlier but now there are tests for it).