Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi 2006 duplicate function names

Tags:

delphi

is there a way to make the Delphi compiler recognize and report duplicated function names (especially defined in different Units that the currently compiled unit uses)?

like image 569
Bartosz Radaczyński Avatar asked Nov 21 '25 01:11

Bartosz Radaczyński


2 Answers

There isn't. It would sure be nice if there was, though. You can get around this by using the unit name of the function you'd like to invoke:

uses
  unit1, unit2;

procedure DoSomethingFromUnit1;
begin
  unit1.DoSomething;
end;

Try submitting this to QC as a feature request. It would be a useful thing to have.

like image 67
Mason Wheeler Avatar answered Nov 23 '25 15:11

Mason Wheeler


From the sight of the compiler, duplicate function names are not duplicate if they reside in different scopes. Finding these ambiguities (in sight of the programmer) is supported quite well by Pascal Analyzer.

like image 22
Uwe Raabe Avatar answered Nov 23 '25 15:11

Uwe Raabe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!