unit A;
interface type TFoo = class private procedure Bar(value: integer); overload; public procedure Bar(value: string); overload; end;
implementation
procedure TFoo.Bar(value: integer); begin end;
procedure TFoo.Bar(value: string); begin end;
end.
program Test; uses A;
begin var foo := TFoo.Create; foo.Bar('Hello!'); end.
Expected: this should work. Observed: Error, Bar (the wrong one!) is private.
Comment #1
Posted on Sep 18, 2014 by Happy RabbitGood catch, never had considered that case. The reverse bug was present as well (ie. gain access to a private method through an overload)
Fixed & added tests
Comment #2
Posted on Sep 18, 2014 by Happy RabbitThis issue was closed by revision r2603.
Status: Fixed
Labels:
Type-Defect
Priority-Medium