﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1749	Improve tuple assignment error messages	Peter Aronsson	Peter Aronsson	"The following model:

{{{
model Model1
 
Real[3] x;

  Real y;

  function test

    input Real x;

    input Real x2;

    output Real y[3];
   
output Real z;
 
algorithm
    y:={x,x2 + 1,x + 2};

   z:=x2^2;

 end test;
algorithm
  (y,x):=test(time, time^2);

end Model1;
}}}

produces the following error messages:
{{{

Error processing file: model1.mo
[model1.mo:15:3-15:28:writable] Error: Type mismatch in assignment in (y,x) := M
odel1.test(time,time ^ 2.0) of (Real, Real[3]) := (Real[3], Real)
}}}
{{{
[model1.mo:15:3-15:28:writable] Error: Tuple assignment only allowed when rhs is
 function call (in Model1.test(time,time ^ 2.0))
Error: Error occurred while flattening model Model1
}}}

Clearly, the second error is not true, and it should not be printed. This is a common type of mistake in the compiler that probably originates from the fail semantics of RML combined with unsufficient programming logic ;-)"	defect	closed	critical	1.9.0	Frontend		fixed		Peter Aronsson
