Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Other Compiler    [ Add a report in this area ]  
Report #:  78101   Status: Closed
F2084 Internal Error: C13394 (when accessing a boolean property on a record returned by an array property)
Project:  Delphi Build #:  14.0.3539.24502
Version:    14.0 Submitted By:   Thorsten Engler
Report Type:  Crash / Data loss / Total failure Date Reported:  9/26/2009 8:33:51 PM
Severity:    Infrequently encountered problem Last Updated: 8/31/2010 10:56:24 PM
Platform:    All platforms Internal Tracking #:  
Resolution: Duplicate  Resolved in Build: : 15.0.3722.28600
Duplicate of:  65595
Voting and Rating
Overall Rating: (1 Total Rating)
4.00 out of 5
Total Votes: 3
Description
None
Steps to Reproduce:
program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  TValue = record
    function GetIntTest: Integer;
    function GetIsEmpty: Boolean;
    property IsEmpty: Boolean read GetIsEmpty;
    property IntTest: Integer read GetIntTest;
  end;

  TObject2 = class(TObject)
  private
    function GetTag(const aTag: string): TValue;
    procedure SetTag(const aTag: string; const aValue: TValue);
  public
    property Tags[const aTag: string]: TValue
      read GetTag
      write SetTag;
  end;

{ TObject2 }

function TObject2.GetTag(const aTag: string): TValue;
begin
  {ignore}
end;

procedure TObject2.SetTag(const aTag: string; const aValue: TValue);
begin
  {ignore}
end;

var
  Obj2 : TObject2;

{ TValue }

function TValue.GetIntTest: Integer;
begin
  Result := 1;
end;

function TValue.GetIsEmpty: Boolean;
begin
  Result := True;
end;

begin
  try
    //[DCC Fatal Error] Project1.dpr(64): F2084 Internal Error: C13394
    Assert(Obj2.Tags['Snafu'].IsEmpty);

    //works
    Assert(Obj2.Tags['Snafu'].IntTest = 1);
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01