Opened 14 years ago
Closed 10 years ago
#1459 closed defect (fixed)
Algorithm sections do not handle assertions in all cases
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | Backend | Version: | |
Keywords: | Cc: | Martin Sjölund, Frenkel, TUD, Willi Braun |
Description
In this code, only the equation-assertion is statically checked during translation. We can also remove assertions from algorithm-sections.
Furthermore, the assertions in the algorithm-section do not seem to be called (or at least: they don't cause assertions).
An algorithm block seems to be removed if it does not define any variable (r was added to this example to get the code to run; tested with print("abc") to make sure).
algorithm if time<1.5 then myAssert(time<0.5, "time>=0.5"); assert(time<0.75, "time>=0.75"); end if; assert(false, "time>=0.35"); r := 1.5; equation assert(false, "time>=0.35");
Change History (1)
comment:1 by , 10 years ago
Cc: | added; removed |
---|---|
Component: | → Backend |
Milestone: | → 1.9.1 |
Resolution: | → fixed |
Status: | new → closed |
Summary: | Algorithm sections do not handle all cases → Algorithm sections do not handle assertions in all cases |
Note:
See TracTickets
for help on using tickets.
This was fixed at some point