Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.2.0 / tests / test / ugenfunc19.pp
Size: Mime:
unit ugenfunc19;

{$mode objfpc}{$H+}

interface

type
  TTest = class
    class function Test: LongInt; static;
  end;

  TTestHelper = class helper for TTest
    class function Test: LongInt; static;
  end;

generic function DoTest<T: TTest>: LongInt;

implementation

class function TTest.Test: LongInt;
begin
  Result := 1;
end;

class function TTestHelper.Test: LongInt;
begin
  Result := 2;
end;

generic function DoTest<T>: LongInt;
begin
  Result := T.Test;
end;


end.