﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3975	Incorrect evaluation of boolean vector expression in when statements	Francesco Casella	Per Östlund	"Consider the following test case:
{{{
model M
  Boolean b1, b2;
  Integer i(start = 0, fixed = true);
equation
  b1 = if time > 0.1 then false else false;
  b2 = if time > 0.2 then true else false;
  when cat(1,not{b1}, not {b2}) then
    i = pre(i)+1;
  end when;
end M;
}}}

When compiling it, I get 
{{{
M.c:125:69: error: incompatible types when assigning to type 'modelica_boolean {aka signed char}' from type 'boolean_array {aka struct base_array_s}'
   data->localData[0]->booleanVars[0] /* $whenCondition1 DISCRETE */ = tmp4;
}}}

Note that other boolean expressions are dealt with niceley, e.g.
{{{
model M2
  Boolean b1, b2;
  Integer i(start = 0, fixed = true);
equation
  b1 = if time > 0.1 then false else false;
  b2 = if time > 0.2 then true else false;
  when cat(1,{not b1}, {not b2}) then
    i = pre(i)+1;
  end when;
end M2;
}}}"	defect	closed	high	2.0.0	New Instantiation		fixed		
