Opened 13 years ago

Last modified 9 years ago

#1688 assigned defect

Reinit of non-state variables — at Version 1

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone: Future
Component: Backend Version:
Keywords: Cc: Adrian Pop, Martin Sjölund, Jens Frenkel

Description (last modified by Lennart Ochel)

The following model is accepted by OpenModelica, but should not:

model M
  Real r = time;
equation
  when sample(0,0.1) then
    reinit(r, 2*time);
  end when;
end M;

The appropriate error should be:
Cannot use reinit() on r as it cannot be selected as a state variable

Change History (1)

comment:1 by Lennart Ochel, 12 years ago

Cc: Frenkel TUD added; Jens Frenkel removed
Component: Backend
Description: modified (diff)
Note: See TracTickets for help on using tickets.