Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0015391 [FPC] Compiler minor always 2009-12-19 14:32 2011-05-02 10:43
Reporter David Butler View Status public  
Assigned To Jonas Maebe
Priority normal Resolution fixed  
Status closed   Product Version 2.5.1
Summary 0015391: Open array of procedure of object
Description Cannot pass open arrays of function of object as parameter, for example:

type
  FuncA = function : Integer of object;
  ObjA = class
    function Func1: Integer;
    procedure Proc1(const A: Array of FuncA);
  end;

function ObjA.Func1: Integer;
begin
  Result := 1;
end;

procedure ObjA.Proc1(const A: Array of FuncA);
begin
end;

var A : ObjA;

begin
  A := ObjA.Create;
  A.Proc1([A.Func1]);
end.


returns error when compiled with 2.40rc1:

BugReport1.dpr(28,20) Error: Incompatible type for arg no. 1: Got "Array Of Cons
t/Constant Open Array of LongInt", expected "Open Array Of <procedure variable t
ype of function:LongInt of object;Register>"
Additional Information Compiled in Delphi mode. Above compiles with Delphi.
Tags No tags attached.
FPCOldBugId 0
Fixed in Revision 15201
Attached Files ? file icon BugReport1.dpr [^] (415 bytes) 2009-12-19 14:32

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2009-12-19 14:32 David Butler New Issue
2009-12-19 14:32 David Butler File Added: BugReport1.dpr
2009-12-23 16:38 Jonas Maebe Status new => assigned
2009-12-23 16:38 Jonas Maebe Assigned To => Jonas Maebe
2009-12-23 21:11 Jonas Maebe Fixed in Revision => 14468
2009-12-23 21:11 Jonas Maebe Status assigned => resolved
2009-12-23 21:11 Jonas Maebe Fixed in Version => 2.5.1
2009-12-23 21:11 Jonas Maebe Resolution open => fixed
2010-05-02 15:32 Jonas Maebe FPCOldBugId => 0
2010-05-02 15:32 Jonas Maebe Fixed in Revision 14468 => 15201
2010-05-02 15:32 Jonas Maebe Fixed in Version 2.5.1 => 2.4.1
2010-11-16 16:52 Jonas Maebe Target Version => 2.4.2
2011-05-02 10:43 Marco van de Voort Status resolved => closed



Mantis 1.1.1[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker