Opened 8 years ago
Last modified 3 years ago
#4412 accepted defect
Error with Protected Elements
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Backend | Version: | v1.12.0 |
Keywords: | protected, PNlib | Cc: |
Description
In the following model
model ProtectedError Real var1; protected Real var2 = 1; equation var1 = var2; end ProtectedError;
should be prevented by the keyword protected
that the variable var2
is displayed in the output of OMEdit.
However, both variables var1
and var2
are displayed.
Change History (10)
comment:1 by , 8 years ago
Component: | *unknown* → Backend |
---|---|
Milestone: | Future → 1.12.0 |
Status: | new → accepted |
comment:2 by , 8 years ago
comment:3 by , 8 years ago
I’ve fixed this partially (OMCompiler#1644). There is still one case in which a protected variable is dumped to the result file: The correspondent variable to an alias variable having protected=false is always dumped to the result file in order to allow the lookup of the alias variable.
Is this behaviour acceptable?
comment:4 by , 8 years ago
It greatly reduces the number of variables displayed in my models and is therefore, in my opinion, acceptable.
comment:5 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|
Milestone moved to 1.13.0 due to 1.12.0 already being released.
comment:7 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:9 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
Good ticket!
Observation: if in line 6
var1 = var2;
is replaced withvar1 = 42;
the variable is not shown (correctly protected).There is a somewhat related ticket: #4346