Skip to content

Commit

Permalink
Fix invertRange (#12002)
Browse files Browse the repository at this point in the history
  • Loading branch information
phannebohm committed Feb 19, 2024
1 parent 8bc0510 commit a10c18c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/NFFrontEnd/NFExpression.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4758,8 +4758,8 @@ public
range := match range
local
Expression step;
case RANGE() then RANGE(range.ty, range.stop, SOME(INTEGER(-1)), range.start);
case RANGE(step = SOME(step)) then RANGE(range.ty, range.stop, SOME(negate(step)), range.start);
case RANGE() then RANGE(range.ty, range.stop, SOME(INTEGER(-1)), range.start);
else algorithm
Error.addMessage(Error.INTERNAL_ERROR,{getInstanceName() + " failed because expression is not a range: \n"
+ toString(range)});
Expand Down

0 comments on commit a10c18c

Please sign in to comment.