Opened 14 years ago

Last modified 14 years ago

#1239 closed defect (fixed)

No error message when assigning non-tuple output from a function to a tuple

Reported by: Per Östlund Owned by: Per Östlund
Priority: normal Milestone:
Component: Instantiation Version:
Keywords: Cc: Per Östlund,

Description

The following model is invalid since the output of the function is not a tuple, but no error message is printed.

model test
   Real p1[2,2]={{10000,0},{0,10000}};
   Real p2[2,2]={{10,0},{0,10}};
   Real r1[2,2];
   Real r2[2,2];
equation
   (r1,r2) = myCal(p1,p2);
end test;

function myCal
  input  Real A[2,2];
  output Real  B[2,2];
  parameter Real C[2,2]={{5.00,2.00},{3.00,5.00}};
algorithm
  B:=C*A;
end myCal;

Change History (1)

comment:1 by Martin Sjölund, 14 years ago

"Fixed" in r5922. We don't catch if either expression can't be elaborated; but at least we print an error with line number and the equation if we do fail.

Note: See TracTickets for help on using tickets.