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 / webtbs / tw8151a.pp
Size: Mime:
{ %opt=-Oodfa -Sew -vw }
{ %norun }
{$IFDEF FPC}
  {$mode delphi}
{$ENDIF}

program FunctionResultAnalysisWrong;
uses
  SysUtils;

var
  I : longint;

function Test1: Integer;
begin
  raise Exception.Create('');
end; {should NOT generate "Warning: Function result does not seem to be set" (doesn't in delphi, does in FPC) }

function Test2: Integer;
begin
  if i > 0 then
    raise Exception.Create('')
  else
    raise Exception.Create('');
end; {should NOT generate "Warning: Function result does not seem to be set" (doesn't in delphi, does in FPC) }

function Test4: Integer;
begin
  if i > 0 then
    raise Exception.Create('')
  else
    Result := 0;
end; {should NOT generate "Warning: Function result does not seem to be set" (doesn't in delphi and FPC) }

begin
  i:=1;
end.