mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 21:50:18 +02:00
codetools: tests: class helpers Self.Method
git-svn-id: trunk@49979 -
This commit is contained in:
parent
540ba629c0
commit
8f39050549
@ -1,3 +1,7 @@
|
||||
{
|
||||
Test with:
|
||||
./finddeclarationtest --format=plain --suite=TestFindDeclaration_ClassHelper
|
||||
}
|
||||
unit fdt_classhelper;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
@ -16,6 +20,21 @@ type
|
||||
function MyVar: integer;
|
||||
end;
|
||||
|
||||
{ TMyClass }
|
||||
|
||||
TMyClass = class(TObject)
|
||||
public
|
||||
procedure Hello;
|
||||
end;
|
||||
|
||||
{ TMyClassHelper }
|
||||
|
||||
TMyClassHelper = class helper for TMyClass
|
||||
public
|
||||
procedure Hello2;
|
||||
end;
|
||||
|
||||
|
||||
procedure DoIt;
|
||||
|
||||
implementation
|
||||
@ -29,6 +48,20 @@ begin
|
||||
sl.Free;
|
||||
end;
|
||||
|
||||
{ TMyClassHelper }
|
||||
|
||||
procedure TMyClassHelper.Hello2;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
{ TMyClass }
|
||||
|
||||
procedure TMyClass.Hello;
|
||||
begin
|
||||
Self.Hello2{declaration:fdt_classhelper.TMyClassHelper.Hello2};
|
||||
end;
|
||||
|
||||
{ TStringsClassHelper }
|
||||
|
||||
function TStringsClassHelper.MyVar: integer;
|
||||
|
Loading…
Reference in New Issue
Block a user