Opened 12 years ago

Closed 12 years ago

#1807 closed defect (fixed)

Let assert() trigger during initialization

Reported by: Martin Sjölund Owned by: Lennart Ochel
Priority: high Milestone: 1.9.0
Component: Run-time Version:
Keywords: Cc:

Description

The following code should trigger an assertion during initialization, but does not!

loadString("model M
  parameter Real p(fixed=false);
initial algorithm
  assert(false, \"ass failed\");
  p := 17.0;
end M;");getErrorString();
simulate(M);
val(p,43);

Change History (8)

comment:1 by Willi Braun, 12 years ago

Status: newaccepted

comment:2 by Willi Braun, 12 years ago

Owner: changed from Willi Braun to Lennart Ochel
Status: acceptedassigned

comment:3 by Bill Janssen, 12 years ago

Note that the "set_struct" macro has to be re-written a bit to use with C++ intead of C, because "x = (FILE_INFO){...}" is not valid C++. That is, casting of a compound literal is not allowed.

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

Lennart, is this coming along?

comment:5 by Lennart Ochel, 12 years ago

Sure – but it is not on top of my todo list. Should I increase the priority for some reason?

Last edited 12 years ago by Lennart Ochel (previous) (diff)

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

Well, that or change the ticket priority from blocker ;) If it blocks 1.9.0 release, we cannot make the release before it works...

comment:7 by Lennart Ochel, 12 years ago

Priority: blockerhigh

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

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.