procedural-type variable(function) in Format Args [] - Fatal: Compilation aborted.
Original Reporter info from Mantis: taka_jp
-
Reporter name: removed
Original Reporter info from Mantis: taka_jp
- Reporter name: removed
Description:
FPC
------------------------------------------------
Compiling varfunc_test.lpr
varfunc_test.lpr(25,25) Error:
Incompatible types: got "LongInt" expected "Poiner"
varfunc_test.lpr(28) Fatal:
There were 1 errors compiling module, stopping
Fatal: Compilation aborted
--------------------------------------------------------
program varfunc_test;
{$IFDEF FPC}
{$mode Delphi}
{$ELSE}
{$APPTYPE CONSOLE}
{$ENDIF}
{$H+}
uses sysutils;
function TestFunc1 : Longint;
begin
Result := 100;
end;
Type Tfunc1 = function : Longint;
var
TestFunc2 : Tfunc1 = TestFunc1;
begin
writeln({$IFDEF FPC}'FPC'{$ELSE}'Delphi'{$ENDIF});
writeln( Format('%d',[TestFunc1]) );
writeln( Format('%d',[TestFunc2]) );
end.
Mantis conversion info:
- Mantis ID: 15446
- Version: 2.5.1
- Fixed in version: 2.4.2
- Fixed in revision: 15201 (#78e19bdd)