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 #:
103798
Status:
Open
Class constructors for generic classes do not run if all code is in a .dpr file
Project:
Delphi
Build #:
15.0.3953.35171
Version:
15.1
Submitted By:
David Heffernan
Report Type:
Crash / Data loss / Total failure
Date Reported:
2/29/2012 7:22:13 AM
Severity:
Commonly encountered problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All platforms
Internal Tracking #:
271693
Resolution:
None
(Resolution Comments)
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
10
Description
Class constructors for generic classes do not run if all code is in a .dpr file.
Moving code to a separate .pas unit is sufficient to workaround the problem.
Steps to Reproduce:
The class constructor in the following program is not executed.
program ClassConstructorBug;
{$APPTYPE CONSOLE}
type
TTestClass<T> = class
private
class constructor Create;
end;
class constructor TTestClass<T>.Create;
begin
Writeln('class created');
end;
begin
TTestClass<Integer>.Create;
end.
Workarounds
None
Attachment
None
Comments
Tomohiro Takahashi at 4/17/2012 6:45:20 AM
-
This report was opened with valid Internal Tracking Number.
Thanks.
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