Opened 12 years ago

Last modified 7 years ago

#2107 closed defect

Protected elements not protected — at Version 2

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

Description (last modified by Lennart Ochel)

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.

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 (2)

comment:1 by Per Östlund, 12 years ago

Component: BackendFrontend
Owner: changed from probably noone to somebody

comment:2 by Lennart Ochel, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.