fpc/tests/webtbs/tw22329.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

33 lines
518 B
ObjectPascal

{ %NORUN }
program tw22329;
{$mode delphi}
type
TObjectHelper = class helper for TObject
procedure SayHello(const I: Integer); overload;
procedure SayHello(const S: string); overload;
end;
procedure TObjectHelper.SayHello(const I: Integer); overload;
begin
Writeln('Hello ', I);
end;
procedure TObjectHelper.SayHello(const S: string); overload;
begin
Writeln('Hello ', S);
end;
var
Obj: TObject;
begin
Obj := TObject.Create;
try
Obj.SayHello('FPC');
finally
Obj.Free;
end;
end.