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.0.0 / tests / test / tgeneric50.pp
Size: Mime:
{ %NORUN }

{ this tests that hint directives defined for a generic only apply when
  specializung a generic and that specializations may introduce their own
  directives }
program tgeneric50;

{$ifdef fpc}
  {$mode delphi}
{$endif}

type
  TTest<T> = class

  end deprecated 'Message A' platform;

  // these will both print that TTest<T> is deprecated and platform
  TTestInteger = TTest<Integer> deprecated 'Message B' experimental;
  TTestString = TTest<String>;

var
  // this will print that TTestInteger is deprecated and experimental
  t: TTestInteger;
  // this will print nothing
  t2: TTestString;
begin
  // this will print that TTest<T> is deprecated and platform
  t2 := TTest<String>.Create;
  // this will print that TTestInteger is deprecated and experimental
  t := TTestInteger.Create;
end.