Opened 13 years ago

Closed 7 years ago

#1555 closed defect (fixed)

Model with array of unknown size fails without error message

Reported by: perost Owned by: perost
Priority: critical Milestone: 1.13.0
Component: Frontend Version:
Keywords: Cc: perost

Description

The following model should output an error message, not fail silently:

model M
  Real r[:];
end M;

Change History (5)

comment:1 Changed 13 years ago by sjoelund.se

Fixed in trunk

comment:2 Changed 13 years ago by sjoelund.se

Reopening as the fix added unintended error messages that were missed (ran testsuite in wrong directory)

comment:3 Changed 9 years ago by dietmarw

  • Cc changed from perost, perost to perost
  • Milestone set to Future

comment:4 Changed 8 years ago by perost

  • Component set to Frontend
  • Priority changed from normal to critical

This doesn't actually fail anymore. It creates an array of size 1, which is worse than failing since it succeeds but does the wrong thing.

comment:5 Changed 7 years ago by casella

  • Milestone changed from Future to 1.13.0
  • Resolution set to fixed
  • Status changed from reopened to closed

OMC 1.13.0, with the new front end, produces the following error:

[1] 23:41:08 Translation Error
[M: 2:3-2:12]: Failed to deduce dimension 1 of r due to missing binding equation.

while the old front end gives:

[1] 23:42:10 Symbolic Error
Too few equations, under-determined system. The model has 0 equation(s) and 1 variable(s).

[2] 23:42:10 Symbolic Warning
[M: 2:3-2:12]: Variable r[1] does not have any remaining equation to be solved in.
  The original equations were:

I'd say this behaviour is ok (particularly the new front end's)

Note: See TracTickets for help on using tickets.