Opened 14 years ago

Closed 4 years ago

Last modified 4 years ago

#1519 closed defect (fixed)

Add check for self-referencing matrix dimensions

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone: 1.16.0
Component: New Instantiation Version:
Keywords: Cc: Martin Sjölund, Per Östlund

Description

Dymola gives an error for this, and works fine if the matrix is square. OpenModelica does not complain enough (this makes me uneasy, and should make this bug top priority).

model M
  Real A[:,size(A,1)] = {{1,2}};
end M;

Change History (3)

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

Component: Backend
Milestone: Future
Priority: lowhigh

comment:2 by Per Östlund, 4 years ago

Component: BackendNew Instantiation
Resolution: fixed
Status: newclosed

The new frontend gives an error for this:

Error: Type mismatch in binding ‘A = {{1, 2}}‘, expected array dimensions [1, 1], got [1, 2].

which I guess is good enough.

comment:3 by Francesco Casella, 4 years ago

Milestone: Future1.16.0
Note: See TracTickets for help on using tickets.