﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5212	pre(x) in when clause conditions are illegal and should be rejected	Francesco Casella	Per Östlund	"Consider the following test case:
{{{
model TestPreReal
  Real x(start = 0, fixed = true);
  Boolean b(start = false, fixed = true);
  
equation
  der(x) = 10;
  when pre(x) > 3 then
    b = true;
  end when;
end TestPreReal;
}}}
This code is illegal because the argument of {{{pre()}}} must be a discrete-time expression (Sect. 3.7.3 of the Specification), and expressions containing non-discrete Real variables only become discrete expressions if they are found in the ''body'' of a when clause (Sect. 3.8.3 of the Spefication). Hence, not in the condition.

So, this code should be rejected. Instead,  it is accepted and generates a simulation code with unspecified behaviour."	defect	closed	high	2.0.0	New Instantiation		fixed		
