﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3386	Compile error with constant array	crupp@…	somebody	"The following script fails at compile time.
{{{
loadString(""
model constantarraybug
  constant Real[2, 6] phi = {{1, 2, 3, 4, 5, 6}, {21, 22, 23, 24, 25, 26}};
  Real[2] tmp;
  parameter Real[3] f = {0, 1, 0};
  parameter Real[3] t = {0, 0, -1};

equation
   tmp = phi[:, 1:3] * f + phi[:, 4:6] * t;
end constantarraybug;
"");

buildModel(constantarraybug);
}}}

If the constant array is instead a parameter array then all works as expected. It also seems to only affect two dimensional arrays since the following works.

{{{
loadString(""
model constantworks
  constant Real[6] phi = {21, 22, 23, 24, 25, 26};
  Real tmp;
  parameter Real[3] f = {0, 1, 0};
  parameter Real[3] t = {0, 0, -1};
equation
   tmp = phi[1:3] * f + phi[4:6] * t;
end constantworks;
"");

buildModel(constantworks);
}}}

Tested in v1.9.3-dev-1158-g32bc683."	defect	closed	high	1.9.4	*unknown*	trunk	fixed		
