Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
Compiler
Delphi
Anonymous Methods
BASM
Code Generation/Optimization
Error Recovery
Errors - Warnings
Exceptions
Execution
Finalization
Generics
Header Generation
Interaction with UI
Interfaces
Language
Linker
Make Logic
Memory Manager
OBJ Generation
OBJ Support
Other Compiler
Packages
RTTI
String Resources
TD Debug Info
Thread Local Storage
Version resilience
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Compiler/Delphi/Generics
[ Add a report in this area ]
Report #:
109187
Status:
Closed
[REGRESSION from XE2] Generic Class with Generic Dynamic Array, URW1147
Project:
Delphi
Build #:
17.0.4625.53395
Version:
17.0
Submitted By:
Steffen Binas
Report Type:
Crash / Data loss / Total failure
Date Reported:
10/1/2012 11:36:15 AM
Severity:
Serious / Highly visible problem
Last Updated:
4/23/2013 8:06:37 AM
Platform:
All platforms
Internal Tracking #:
32373
Resolution:
Fixed
(Resolution Comments)
Resolved in Build:
:
XE4
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
40
Description
Compiler throws internal Error URW1147 when compiling the a generic class with a generic dynamic array assigned in a local method.
This code used to compile in XE2.
Steps to Reproduce:
- dcc -B GenericErrorPrj.dpr
//// File: GenericDefinition.pas
unit GenericDefinition;
interface
type
TRec<T> = record
Value : T;
end;
TRecArray<T> = array of TRec<T>;
TFoo<T> = class
private
FRecs : TRecArray<T>;
protected
procedure Bar;
public
end;
implementation
procedure TFoo<T>.Bar;
var
A: TRecArray<T>;
begin
A := FRecs; // <------ Comment this out to make the error go away
end;
end.
//// <------- Crashes here with URW1147
//// File: GenericConsumer.pas
unit GenericConsumer;
interface
uses
GenericDefinition;
type
TMyClass = class(TFoo<TObject>)
end;
procedure TestXE3Bug;
implementation
procedure TestXE3Bug;
var
Hash: TMyClass;
begin
Hash := TMyClass.Create;
end;
end.
//// File: GenericErrorPrj.dpr
program GenericErrorPrj;
uses
GenericDefinition,
GenericConsumer;
begin
TestXE3Bug;
end.
Workarounds
procedure TFoo<T>.Bar_Workaround;
var
A: TRecArray<T>;
begin
A := nil; // <--- Add this line to make the error go away
A := FRecs;
end;
Attachment
None
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us