﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1402	Checking types in if expressions (the non-evaluated branch)	dhedberg	dhedberg	"In the MSL combitable models you find code such as:

{{{
for i in 1:n loop
  y[i]=if not tableOnFile and size(table, 1) == 1 then table[1,columns[i]] else tableTimeIpo(tableID, columns[i], u[i]);
end for;
}}}

where the condition of the if expression is a parameter. If it is set to false (interpolation data is read from file) we get an error when building the model as the true branch is still type checked and hence an illegal subscript is found. This needs to be addressed as the table classes of MSL generates an error message when they are used in models and the data is located in an external file (you set the fileName and tableOnFile parameters of the class).

However, worth noting is that it seems like the type checking is more relaxed when checking the model as this error message is not produced during a checkModel call. The relaxed type checking is due to the ""checkModel"" being set and as a consequence the elabSubscriptsDims2() function in Static.mo will not fail in this case."	defect	closed	high				fixed		dhedberg
