0

New warning: Declared but not used variables

Nicholas Ring 10 years ago 0

While the complier does a good job of warning the developer if a variable has been declared but not used, it doesn't always catch them all - especially if the variable is an interface.


It would be good if it ignored any nil assignments. Example:

var
  LMyInterface : IMyInterface;
begin
  LMyInterface := nil;
  // ... blah blah blah
end;  

The above would be treated as declared but not used.


Possibility add an optional about the assignment?