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 / tgeneric79.pp
Size: Mime:
{ %NORUN }

{ additional test based on 21064 }
program tgeneric79;

{$mode objfpc}

type
  generic IGenericIntf<T> = interface
    function SomeMethod: T;
  end;

  generic TGenericClass<T> = class(TInterfacedObject, specialize IGenericIntf<LongInt>)
  private
  protected
    function GenericIntf_SomeMethod: LongInt;
    function specialize IGenericIntf<LongInt>.SomeMethod = GenericIntf_SomeMethod;
  end;

function TGenericClass.GenericIntf_SomeMethod: LongInt;
begin
end;

type
  TGenericClassLongInt = specialize TGenericClass<String>;
begin
end.