Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Anonymous Methods    [ Add a report in this area ]  
Report #:  92762   Status: Closed
Generic anonymous method with an open array parameter: Undeclared identifier $0$Body
Project:  Delphi Build #:  15.0.3890.34076
Version:    15.0 Submitted By:   Blaise Thorn
Report Type:  Crash / Data loss / Total failure Date Reported:  3/31/2011 3:37:34 PM
Severity:    Commonly encountered problem Last Updated: 5/19/2012 12:42:29 AM
Platform:    All platforms Internal Tracking #:   282465
Resolution: Fixed (Resolution Comments) Resolved in Build: :
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
The test program shown in Steps is completely correct, yet the compiler cannot compile it, reporting the bogus E2003 Undeclared identifier: '$0$Body'.
Steps to Reproduce:
type C<T> = class

type M = reference to procedure (const a: array of T);

function foo: M;
end;

function C<T>.foo: M;
begin
// E2003 Undeclared identifier: '$0$Body'

result :=


procedure (const a: array of T)


begin


end
end;

begin

C<integer>.Create.foo()( [1,2,3] )
end.
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01