I encounter the following error while trying to compile my application in Delphi 2007 (11.0.2902.10471):
F2084 Internal Error: URW5517
After a thorough testing, I found out it should be a Delphi compiler error in the version of Delphi 2007.
To replay the problem, create a new console project in Delphi 2007 and add the following unit into project:
unit Test_URW5517;
interface
implementation
procedure Test(const aObject: TObject);
var E: procedure(const aObject: TObject = nil);
begin
end;end.
Then compile the project by pressing Ctrl-F9 for few times and you will encounter the error eventually. If you build the project (Shift-F9) instead of compile, no error will be prompted.
In above unit, the Test procedure has a procedural variable E with the following declaration:
var E: procedure(const aObject: TObject = nil);
The procedure has a default parameter aObject. This is the cause of the URW5517 internal error.
To avoid the internal error, try not to use default parameter in procedural variable declaration:
var E: procedure(const aObject: TObject);
This problem should have reported in Quality Central (QC#58068: Internal error in procedural type declaration with default parameter). However, the resolution was “can’t reproduce” or it resolve in Delphi 2009. There is no patch for Delphi 2007 to resolve this problem.