#2296 closed defect (fixed)
Checks for protected elements
Reported by: | sjoelund.se | Owned by: | perost |
---|---|---|---|
Priority: | critical | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | trunk |
Keywords: | Cc: |
Description
We currently allow access of protected elements that should not be possible to access. This is very important for bootstrapping since dependency analysis depends on protected elements not being part of the interface of an encapsulated package.
encapsulated package P protected constant Real c = 1.0; function f output Real c = 1.0; end f; end P; encapsulated model M import P; Real r1 = P.c; // illegal Real r2 = P.f(); // illegal end M;
Change History (10)
comment:1 Changed 9 years ago by sjoelund.se
- Milestone changed from 1.9.3 to 1.9.4
comment:2 Changed 9 years ago by adrpo
- Priority changed from blocker to critical
comment:3 Changed 9 years ago by sjoelund.se
- Milestone changed from 1.9.4 to 1.9.5
Milestone pushed to 1.9.5
comment:4 Changed 9 years ago by sjoelund.se
- Milestone changed from 1.9.5 to 1.10.0
Milestone renamed
comment:5 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.10.0 to 1.11.0
Ticket retargeted after milestone closed
comment:6 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.11.0 to 1.12.0
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:7 Changed 7 years ago by casella
- Component changed from Frontend to New Instantiation
- Milestone changed from 1.12.0 to 2.0.0
- Owner changed from somebody to perost
- Status changed from new to assigned
As of v1.13.0-dev-188-g2c5818d with -d=newInst, the access to P.c is correctly detected as illegal. However the following model
encapsulated model M import P; // Real r1 = P.c; // illegal Real r2 = P.f(); // illegal end M;
fails with error messages which seem related to an incomplete implementation of functions in the new front-end, but not because of attemped access to a protected element.
comment:8 Changed 7 years ago by perost
- Resolution set to fixed
- Status changed from assigned to closed
Fixed in 691f4e9.
comment:9 follow-up: ↓ 10 Changed 7 years ago by janK
Just a shot follow-up: Is ticket #4346 related with this one? Thanks!
Moved to new milestone 1.9.4