0

iterator code bug

abcd 2 months ago 0
How do we ever break out of this loop? If inherited next gets to the end of the list it will return false but this next will just go back to the top of the repeat.
  function TBadCustomerIterator.Next: Boolean;
  begin
    repeat
      Result := inherited Next;
    until Result and CurrentItem.CreditStop.
  end;