mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:28:14 +02:00

symtable.pas, searchsym_in_class: * if we found a helper method that has overload defined we should not forget the symbol as there can be a case that no method with that name is defined in the extended class hierarchy symtable.pas, searchsym_in_record: * analogous to the above + added test given in the issue + added analogous test for record helpers git-svn-id: trunk@21764 -
32 lines
471 B
ObjectPascal
32 lines
471 B
ObjectPascal
{ %NORUN }
|
|
|
|
program trhlp44;
|
|
|
|
{$mode delphi}
|
|
|
|
type
|
|
TTest = record
|
|
|
|
end;
|
|
|
|
TTestHelper = record helper for TTest
|
|
procedure SayHello(const I: Integer); overload;
|
|
procedure SayHello(const S: string); overload;
|
|
end;
|
|
|
|
procedure TTestHelper.SayHello(const I: Integer); overload;
|
|
begin
|
|
Writeln('Hello ', I);
|
|
end;
|
|
|
|
procedure TTestHelper.SayHello(const S: string); overload;
|
|
begin
|
|
Writeln('Hello ', S);
|
|
end;
|
|
|
|
var
|
|
Obj: TTest;
|
|
begin
|
|
Obj.SayHello('FPC');
|
|
end.
|