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 / webtbs / tw25603.pp
Size: Mime:
{$MODE DELPHI}

type
  TA = class
    const C = 1;
  end;

  TB<T> = class
    procedure Foo;
  end;

procedure TB<T>.Foo;
var
  i: Integer = 0;
begin
  // i := i + T.C; // <- is ok
  Inc(i, T.C); // Error: Incompatible types: got "untyped" expected "LongInt"
  if i<>1 then
    halt(1);
end;
var
  B : TB<TA>;
begin
  B:=TB<TA>.Create;
  B.Foo;
  B.Free;
  writeln('ok');
end.