﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4521	OM does not allow omitting a function output	massimo ceraolo	somebody	"Modelica specifications allow to use function calls in which only part of the function outputs are used (MS 3.3 rev2 sect. 12.4.3).
However in some cases this is not accepted by OM. 
Consider the following package:


{{{
package TestRealFun
  model TestMdl
    parameter Real Z[2] = TestFun(2, {1.0, 2.0});
  end TestMdl;

  function TestFun ""returns an array and a scalar""
    input Integer n;
    input Real x[n];
    output Real z1[n];
    output Real z2;
  algorithm
    for i in 1:n loop
      z1[i] := x[i];
    end for;
    z2 := 2 * x[1];
  end TestFun;

end TestRealFun;
}}}

If we run TestMdl we get the following error:

{{{
[1] 21:35:17 Translation Error
[TestRealFun: 3:5-3:49]: Type mismatch in modifier of component Z, declared type Real[2], got modifier ({1.0, 2.0}, 2.0) of type (Real[2], Real).

[2] 21:35:17 Translation Error
Error occurred while flattening model TestRealFun.TestMdl

}}}

Tested with OM 1.12 beta1 for win 64"	defect	closed	normal	1.12.0	*unknown*		fixed		
