fpc/tests/test/trhlp44.pp
svenbarth 71c13190e1 Fix for Mantis #22329.
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 -
2012-07-03 16:27:03 +00:00

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.