﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4834	Problem with conditional equation involving structural parameters	Francesco Casella	Per Östlund	"Please check [https://libraries.openmodelica.org/branches/newInst/Modelica_3.2.2/files/Modelica_3.2.2_Modelica.Thermal.HeatTransfer.Examples.Motor.err Modelica.Thermal.HeatTransfer.Examples.Motor]. 

The model contains the following equation:
{{{
final parameter Real p_offset[nout]=
  (if size(offset, 1) == 1 then ones(nout)*offset[1] else offset)
}}}

The NF complains that:

{{{
Type mismatch in if-expression in component.
True branch: {1.0, 1.0} .* (lossTable.offset[1]) has type Real[2],
false branch: lossTable.offset has type Real[1].
}}}

As far as I understand, in the case of if-expressions depending on structural parameters, it would make sense to only evaluate the active branch and just ignore the other one. I guess the old FE just did that."	defect	closed	high	2.0.0	New Instantiation		fixed		
