lazarus/components/codetools/tests/fdt_classhelper.pas
mattias 4ea24df450 codetools: test for find declaration
git-svn-id: trunk@40196 -
2013-02-06 15:01:24 +00:00

41 lines
564 B
ObjectPascal

unit fdt_classhelper;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type
{ TStringsClassHelper }
TStringsClassHelper = class helper for TStrings
public
function MyVar: integer;
end;
procedure DoIt;
implementation
procedure DoIt;
var
sl: TStringList;
begin
sl:=TStringList{declaration:Classes.TStringList}.Create;
writeln('DoIt ',sl.MyVar{declaration-classhelper:fdt_classhelper.TStringsClassHelper.MyVar});
sl.Free;
end;
{ TStringsClassHelper }
function TStringsClassHelper.MyVar: integer;
begin
Result:=123;
end;
end.