Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Generics    [ Add a report in this area ]  
Report #:  121368   Status: Closed
F2084 internal compiler error C25026
Project:  Delphi Build #:  19.0.14356.6604
Version:    19.0 Submitted By:   Denis Sutyagin
Report Type:  Crash / Data loss / Total failure Date Reported:  12/25/2013 4:51:13 AM
Severity:    Infrequently encountered problem Last Updated: 4/15/2014 6:34:20 PM
Platform:    All platforms Internal Tracking #:   46314
Resolution: Fixed (Resolution Comments) Resolved in Build: : XE6
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 20
Description
In Delphi XE5 Update 1 and Update 2, the code below causes F2084 internal compiler error C25026

------------
program mytest;

type
  TEntry<TKey> = record
    Key: integer;
  end;

  TEntryInit<TKey> = class
  public
    procedure InitializeArray(var entry : TEntry<TKey>);
  end;

procedure TEntryInit<TKey>.InitializeArray(var entry: TEntry<TKey>);
begin
  Initialize(entry, 5);
end;  // <<--- F2084 internal compiler error C25026

begin
  TEntryInit<string>.Create();
end.
------------
Steps to Reproduce:
Compile code from description
Workarounds
Not found
Attachment
None
Comments

Denis Sutyagin at 12/30/2013 4:31:16 AM -
The same error occures if we use System.Finalize(entry)

Denis Sutyagin at 12/30/2013 4:46:57 AM -
I think to help compiler correctly extract TEntry<TKey> type we can repalce

System.Initialize(entry)  

by

System.InitializeArray(@entry, TypeInfo(TEntry<TKey>),1)


also - replace Finalize by FinalizeArray


Server Response from: ETNACODE01