Skip to content

Commit

Permalink
Make List.position return failure
Browse files Browse the repository at this point in the history
Previously, position would silently return success with position as
listLength+1.
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed Jul 6, 2015
1 parent 6547655 commit 10cb0fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/Util/List.mo
Expand Up @@ -4667,9 +4667,9 @@ algorithm
if valueEq(e, inElement) then
return;
end if;

outPosition := outPosition + 1;
end for;
fail();
end position;

public function positionOnTrue<T>
Expand Down

0 comments on commit 10cb0fb

Please sign in to comment.