﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4858	Issue with String arrays and iterators in NF	Francesco Casella	Per Östlund	"Please check the model [https://libraries.openmodelica.org/branches/newInst/ScalableTestSuite/files/ScalableTestSuite_ScalableTestSuite.Electrical.BreakerCircuits.ScaledExperiments.BreakerNetwork_N_10_M_10.err ScalableTestSuite.Electrical.BreakerCircuits.ScaledExperiments.BreakerNetwork_N_10_M_10]. The compilation with the NF fails in the CodeGen phase, but the root cause is in the NF, as demonstrated by this simple test case, which fails with the same error message:

{{{
package Test
  model M
    parameter String name;
  end M;
 
  model P
    parameter Integer N = 2;
    M m[N](name={String(i) for i in 1:N});
  end P;
end Test;
}}}

Flattening model Test.P with the old FE gives
{{{
class Test.P
  parameter Integer N = 2;
  parameter String m[1].name = ""1"";
  parameter String m[2].name = ""2"";
end Test.P;
}}}
while the new FE gives
{{{
class Test.P
  parameter Integer N = 2;
  parameter String m[1].name = array(String(i, 0, true) for i in 1:2)[1];
  parameter String m[2].name = array(String(i, 0, true) for i in 1:2)[2];
end Test.P;
}}}

Is this because of the still missing function evaluation feature?"	defect	closed	high	2.0.0	New Instantiation		fixed		
