Opened 12 years ago

Last modified 7 years ago

#2107 closed defect

Protected elements not protected — at Initial Version

Reported by: jwharington@… Owned by: probably noone
Priority: high Milestone: 2.0.0
Component: Frontend Version: trunk
Keywords: Cc:

Description

Access control via protected keyword is ignored, violating modelica language 3.2 spec section 4.1 "Access Control - Public and Protected Elements".

Example follows. This compiles and runs fine, it should error out.

{{{#mo
class protectedvar

class Container

protected
Boolean youcanttouchthis (start = true);
Real youcanttouchthat;

end Container;

Container container;

algorithm

container.youcanttouchthis := false;

equation

container.youcanttouchthat = 0;

end protectedvar;
}}}

Change History (0)

Note: See TracTickets for help on using tickets.