#2296 closed defect (fixed)
Checks for protected elements
Reported by: | Martin Sjölund | Owned by: | Per Östlund |
---|---|---|---|
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 by , 9 years ago
Milestone: | 1.9.3 → 1.9.4 |
---|
comment:2 by , 9 years ago
Priority: | blocker → critical |
---|
comment:6 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:7 by , 7 years ago
Component: | Frontend → New Instantiation |
---|---|
Milestone: | 1.12.0 → 2.0.0 |
Owner: | changed from | to
Status: | new → 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.
follow-up: 10 comment:9 by , 7 years ago
Just a shot follow-up: Is ticket #4346 related with this one? Thanks!
Moved to new milestone 1.9.4