Opened 11 years ago

Closed 11 years ago

#2521 closed defect (fixed)

Type mismatch on hierarchical matrix

Reported by: Malte Lenz Owned by: Martin Sjölund
Priority: high Milestone: 1.9.1
Component: Frontend Version: trunk
Keywords: Cc:

Description

Validating Matrix as defined like this:

model Vector
  Real x[2];
end Vector;

model Matrix
  Vector v[2];
equation
  v.x = {{1,2},{3,cos(time)}};
end Matrix;

Results in a compiler bug message:

"[<interactive>:7:3-7:36:writable] Error: Got type mismatch error, but matching types Real[2, 2].
This is a ***COMPILER BUG***, please report it to https://trac.openmodelica.org/OpenModelica.
Error: Error occurred while flattening model Matrix
"

Replacing the cos(time) with a 4, makes the validation work.

Change History (2)

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

Owner: changed from somebody to Martin Sjölund
Status: newassigned

comment:2 by Martin Sjölund, 11 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r18540, with the model added to the testsuite.

Note: See TracTickets for help on using tickets.