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 / toperator12.pp
Size: Mime:
program toperator12;

{$ifdef FPC}
  {$mode Delphi}
{$endif}

type
  R = record
    F: Integer;
    class operator Implicit(const v: integer): R;
  end;

class operator R.Implicit(const v: integer): R;
begin
  Result.F := v;
end;

var
  x: R;
begin
  x := 42;
  if x.F <> 42 then
    halt(1);
end.