packages/fcl-passrc/src/pastree.pp has
function TPasRecordType.IsAdvancedRecord: Boolean;
Var
I : Integer;
Member: TPasElement;
begin
Result:=False;
I:=0;
While (Not Result) and (I<Members.Count) do
begin
Member:=TPasElement(Members[i]);
if (Member.Visibility<>visPublic) then exit(true);
if (Member.ClassType<>TPasVariable) then exit(true);
Inc(I);
end;
end;
The while loop contains a useless "
(Not Result)" condition. The result is false at the loop entry and it's changed only using "
exit(true);" statements.
The attached patch changes "
While (Not Result) and (I<Members.Count) do" to "
While I<Members.Count do".