
+4
Under review
[W504] False positive with classes with multiple constructors where one calls the other
A constructor that calls another constructor in the same class leads to false positive W504.
type
TFoo = class(TObject)
public
constructor Create;
end;
TBar = class(TFoo)
public
constructor Create;
constructor CreateEx;
end;
//<- http://fixinsight.userecho.com/topic/701447-w504-false-positive-with-objects-inherited-from-tobject/
constructor TFoo.Create;
begin
end;
constructor TBar.Create;
begin
inherited Create;
end;
constructor TBar.CreateEx;//<- False positive W504
begin
Create;
end;
type
TFoo = class(TObject)
public
constructor Create;
end;
TBar = class(TFoo)
public
constructor Create;
constructor CreateEx;
end;
//<- http://fixinsight.userecho.com/topic/701447-w504-false-positive-with-objects-inherited-from-tobject/
constructor TFoo.Create;
begin
end;
constructor TBar.Create;
begin
inherited Create;
end;
constructor TBar.CreateEx;//<- False positive W504
begin
Create;
end;
Customer support service by UserEcho
Not fixed:
constructor TLutHandlerArgus2Single.Create(_SensorInfo: TSensorInfo;
Still not fixed:
constructor Tdm_DbasePrivateSession.Create(_Owner: TComponent; const _DatabaseDir: string);
begin
inherited Create(_Owner);
FDatabaseDir := _DatabaseDir;
TFileSystem.ForceDir(FDatabaseDir);
end;