Opened 13 years ago
Closed 7 years ago
#1660 closed defect (fixed)
Redeclare of package causes lookup of package constant to fail
Reported by: | Per Östlund | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | New Instantiation | Version: | |
Keywords: | Cc: | Per Östlund, Adrian Pop |
Description
This model doesn't work:
model C replaceable package P = P1; Real z = P.x; end C; package P1 constant Real x = 1; end P1; package P2 constant Real x = 2; end P2; model D C b(redeclare package P = P2); end D;
The compiler gives an error that it couldn't find P.x in scope C. The model works if the redeclare on D.b is removed. I haven't seen any actual model which uses this pattern yet though.
Change History (3)
comment:1 by , 9 years ago
Cc: | perost, adrpo, perost → perost, adrpo |
---|---|
Milestone: | → Future |
comment:2 by , 7 years ago
Component: | Instantiation → New Instantiation |
---|
comment:3 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
This has worked for some time in the new instantiation.