﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6267	Avoid bad scalarization of parameter bindings	Per Östlund	somebody	"We currently flatten a model such as this:
{{{#!mo
function f
  output Real y[3];
external ""C"" y = f_ext();
end f;

model M
  parameter Real x[:] = f();
end M;
}}}
to
{{{#!mo
function f
  output Real[3] y;

  external ""C"" f_ext(y);
end f;

class M
  parameter Real x[1] = f()[1];
  parameter Real x[2] = f()[2];
  parameter Real x[3] = f()[3];
end M;
}}}
This means the function is called once for each element of the array, so this is obviously something we should try to avoid. This happens particularly with the Table models in the MSL that read input from a file.

One solution is to move the binding to an initial equation, but I'm not sure how safe that is in general. There are many other ways we could handle this in, but most are non-trivial and would probably require extensive changes to the backend."	defect	closed	blocker	1.19.0	Backend	v1.17.0-dev	fixed		Francesco Casella Karim Adbdelhak Adrian Pop Martin Sjölund Mahder Alemseged Gebremedhin
