Delphi内联使用导致'F2084内部错误'

Mou*_*cap 5 delphi inline

我实际上面临着柏林和东京德尔福编译器都出现的编译问题.它发生在我调用一个内联函数时,它本身调用了一个READ函数也被内联的属性......这是一个导致致命内部错误的示例程序:

unit TestForm;
interface
uses System.Classes, Vcl.Forms, Vcl.Controls, Vcl.StdCtrls;
type
  TForm1            = class(TForm)
                        private
                        public
                      end;

  TProgType         = (_Prog1,_Prog2);
  TCxProgTypeHlp    = record helper for TProgType
                        private
                          function  GetIsProg2 : boolean; inline;
                        public
                          property  IsProg2 : boolean read GetIsProg2;
                      end;
  TProgAccess       = class
                        private
                          fProgType : TProgType;
                        public
                          function  ProgType : TProgType;
                          function  IsProg2 : boolean; inline;
                          function  CheckProg(const ProgTag : string) : boolean;
                      end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

uses System.SysUtils;

function TCxProgTypeHlp.GetIsProg2 : boolean;
begin
     Result:=Self = _Prog2;
end;

function TProgAccess.ProgType : TProgType;
begin
     Result:=fProgType;
end;

function TProgAccess.IsProg2 : boolean;
begin
     Result:=ProgType.IsProg2;
end;

function TProgAccess.CheckProg(const ProgTag : string) : boolean;
begin
     Result:=IsProg2;
end;

end.
Run Code Online (Sandbox Code Playgroud)

当我删除任何内联语句时,编译器错误消失.我在做什么有什么误解吗?谢谢你的帮助.

LU *_* RD 5

通常,您无法对内部编译器错误做任何事情.在您的情况下,您找到了一种解决方法,表明您的代码没有任何问题.

来自文档:

"内部错误"之后的信息包含一个或多个字符,后面紧跟一个数字,表示编译器本身发生错误的文件和行号.虽然此信息可能对您没有帮助,但它可以帮助我们(Embarcadero)在您报告错误时跟踪问题.请务必记下此信息,并将其包含在内部错误说明中.

只需提交QP错误报告并继续.