Each time I assign a variable without using it...
var
X : integer;
begin
X := 123;
end;
On compiling, a hint comes to help me saying:
[dcc32 Hint] Unit1.pas(30): H2077 Value assigned to 'X' never used
Unfortunately, it doesn't occur in case the unused variable is a string
.
var
X : string;
begin
X := 'hello';
end;
I've reproduced the same behavior on Delphi 2007 and Delphi XE7 so I think it is an expected behavior.
Why H2077 hint is not raised for string
variables?