﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1355	Check model gives incorrect error message about variable not being constant	dhedberg	dhedberg	"Checking myUMLModel.Class_0 gives the following result where for some reason the model Class_0 is considered to be a package(?).

{{{
[12] 11:45:16 Validation of class myUMLModel.Class_0
Error: Variable _results in package myUMLModel.Class_0 is not constant

Check of myUMLModel.Class_0 failed.
Error
Class myUMLModel.Class_0 has 5 equation(s) and 5 variable(s).
2 of these are trivial equation(s).
}}}

The definition of the example model:

{{{
package myUMLModel
  model Class_1
    Boolean violated;
    Boolean evaluated;
  algorithm 
    if time > 1 and time < 2 then 
      violated:=true;
      evaluated:=true;
    else
      violated:=false;
    end if;
  end Class_1;

  model Class_0
    model Results
      input Boolean all_req_evaluated;
      input Boolean some_req_violated;
      Boolean test_passed;
    algorithm 
      test_passed:=all_req_evaluated and not some_req_violated;
    end Results;

    myUMLModel.Class_1 req1;
    Results _results(all_req_evaluated=if req1.evaluated then true else false, some_req_violated=if req1.violated then true else false);
  end Class_0;

end myUMLModel;
}}}"	defect	closed	high		Backend		invalid		dhedberg
