+2

False Positive warning to "O801"

Balázs Szakály 10 years ago updated by Lübbe Onken 10 years ago 1

procedure ProcB(var AText: string);

begin

AText := AText + AText;

end;


procedure ProcA(A: string); <-- False positive warning. Cannot declare const, because i pass to ProcB as var param!

begin

ProcB(A); <- var parameter!!!

...

...

end;

+1

Yes, I wanted to report this one as well.


I came upon two cases:


procedure A(S: String);
begin
  S[1] := 'x';
end;

procedure B(S: String);
begin
  Delete(S, 1, 1);
end;