Recursive local function parameters don't compile
Original Reporter info from Mantis: Adriaan van Os
-
Reporter name: Adriaan van Os
Original Reporter info from Mantis: Adriaan van Os
- Reporter name: Adriaan van Os
Description:
{$mode macpas}
{$warnings off}
program recursivefunctionparam;
function first( function test( theint: integer): boolean): integer;
begin {not implemented} end;
function find: integer;
function test( theint: integer): boolean;
begin
first( test)
end;
begin {not implemented} end;
begin end.
Steps to reproduce:
[P18:~/fpc/testfpc] adriaan% fpc recursivefunctionparam.pas
Free Pascal Compiler version 2.5.1 [2010/09/09] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Darwin for i386
Compiling recursivefunctionparam.pas
recursivefunctionparam.pas(13,16) Error: Incompatible type for arg no. 1: Got "Boolean", expected "&LtPos;procedure variable type of function(SmallInt):Boolean is nested;Register>"
Mantis conversion info:
- Mantis ID: 17379
- OS: Mac OS X
- OS Build: 10.5.4
- Build: svn trunk rev 15957
- Platform: Darwin
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 15976 (#7f489635)