Opened 10 years ago
Closed 4 years ago
#3450 closed defect (fixed)
Cyclically dependent parameter error in replaceable function
| Reported by: | Markus Dahl | Owned by: | somebody |
|---|---|---|---|
| Priority: | high | Milestone: | 1.19.0 |
| Component: | New Instantiation | Version: | |
| Keywords: | Cc: |
Description (last modified by )
Validation of P.M in the package below yields the following error in the message browser (but also reports the validation as successful):
Error: Cyclically dependent constants or parameters found in scope : {x}.
In the Base model, changing the modifier x = x in the redeclaration of the function to x = 5 will resolve the error. However those two statements should be equivalent.
Package:
package P
function f
input Real x;
output Real y;
algorithm
y := x + 2;
end f;
partial model Base
replaceable partial function func = f;
end Base;
model M
extends Base(redeclare final function func = f(x = x));
parameter Real x = 5;
Real y = func(1);
end M;
end P;
Attachments (1)
Change History (9)
by , 10 years ago
comment:2 by , 10 years ago
comment:3 by , 10 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 10 years ago
| Description: | modified (diff) |
|---|
comment:5 by , 10 years ago
| Description: | modified (diff) |
|---|
comment:6 by , 10 years ago
| Description: | modified (diff) |
|---|
comment:7 by , 10 years ago
| Summary: | Cyclic dependant parameter error in replaceable function → Cyclically dependent parameter error in replaceable function |
|---|
comment:8 by , 4 years ago
| Component: | Frontend → New Instantiation |
|---|---|
| Milestone: | Future → 1.19.0 |
| Resolution: | → fixed |
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Package file needed to reproduce the error