Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Interaction with UI    [ Add a report in this area ]  
Report #:  58068   Status: Closed
Internal error in procedural type declaration with default parameter
Project:  Delphi Build #:  11.0.2902.10471
Version:    11.2 Submitted By:   Edy Edy
Report Type:  Basic functionality failure Date Reported:  2/10/2008 4:06:19 PM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   257673
Resolution: Cannot Reproduce (Resolution Comments) Resolved in Build: : 12.0.0.11048
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
None
Steps to Reproduce:
#1) In D2007, starts New VCL Forms application then add a button onto the form.
#2) Double-click the button and use the following for the button's OnClick code:

procedure TForm1.Button1Click(Sender: TObject);
type
  TMyFunc = procedure (const Strs: TStrings {ErrorHere!!!} = nil {ErrorHere!!!}) of object;
var
  f: TMyFunc;
begin
  //
end;

#3) Compile the project. First compile should be running OK. Try to re-compile the project again (press Ctrl+F9) AT LEAST three times and the subsequet compiles will generate:
[DCC Error] F2084 Internal Error: URW5517


Try to BUILD the project instead of COMPILE at it should build OK with no Internal Error message.


I think this is IDE/compiler bug
-OR-
I don't think "default parameter for procedural-type type declaration for an object method IS NOT supported" is documented anywhere.

It takes me two days to traverse my codes which were suddenly won't compile!!
Workarounds
Remove the default parameter value for TMyFunc declaration as the line below and it should always compile OK everytime.

  TMyFunc = procedure (const Strs: TStrings {ErrorHere!!! = nil ErrorHere!!!}) of object;
Attachment
None
Comments

None

Server Response from: ETNACODE01