Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#1750 closed defect (fixed)

inheritance in protected section not propagated to components

Reported by: Peter Aronsson Owned by: Peter Aronsson
Priority: critical Milestone: 1.9.0
Component: Frontend Version:
Keywords: Cc: Peter Aronsson

Description

Consider the following model:

model ABC
  model AB
    Real x1 = 2*time+1;
    Real x2 = 2*time+2;
  end AB;
  Real a = x1;
  protected extends AB;
  Real b=x2;
end ABC;

It's flat class is:

class ABC
  Real x1 = 1.0 + 2.0 * time;
  Real x2 = 2.0 + 2.0 * time;
  Real a = x1;
  protected Real b = x2;
end ABC;

But x1 and x2 should be protected too, since they are inherited in a protected section. (See Modelica Language specification v3.1 section 7.1.2).

Change History (3)

comment:1 by Per Östlund, 12 years ago

Cc: petar, → petar
Component: Backend
Resolution: fixed
Status: newclosed

Fixed in r12108, see test case mofiles/ExtendsVisibility.mo.

comment:2 by Martin Sjölund, 12 years ago

Milestone: 1.9.0

comment:3 by Martin Sjölund, 12 years ago

Component: BackendFrontend
Note: See TracTickets for help on using tickets.