Opened 10 years ago
Last modified 10 years ago
#2785 accepted defect
Check of protected variables is not made when using replaceable/redeclare (again)
Reported by: | Henrik Tidefelt | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: |
Description
The erroneous model C2
in #1060 currently validates without any warning.
Repeating the code for ease of reference:
class C1 protected replaceable parameter Real r=3.14; end C1; model C2 replaceable parameter C1 x1(redeclare replaceable Integer r=3); end C2;
(It is not obvious to me that the test flattening/modelica/redeclare/RedeclareVisibility2.mo is actually testing this properly; to me it looks like a flattening test with incorrect expected result, see #2784.)
Change History (2)
comment:1 by , 10 years ago
Component: | New Instantiation → Frontend |
---|---|
Owner: | changed from | to
comment:2 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
Note:
See TracTickets
for help on using tickets.
Looks like Adrian removed the check in r15886 since it didn't work correctly, and he also updated the RedeclareVisibility2 test at the same time. I don't think the test should've been changed though, since the model shouldn't work, so I've reverted it and moved it to the failing tests instead.
I'll see if I can implemented a correct check for this, but it might be a bit tricky.