This is a compiler Delphi Berlin bug?

This is a compiler Delphi Berlin bug?

[dcc32 Fatal Error] Project1.dpr(18): F2084 Internal Error: C28078

From Docs: TypeHandle is an alias to the TypeInfo intrinsic routine.

Using TypeInfo() make compiler happy:


program Project1;

{$APPTYPE CONSOLE}

{$R *.res}

uses
System.Rtti, System.SysUtils;

type
TFoo = class
class procedure Bar;
end;

class procedure TFoo.Bar;
begin
TRttiContext.Create.GetType(TypeHandle(T));
end;

begin
try
TFoo.Bar;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.

Comments

Post a Comment