我实际上面临着柏林和东京德尔福编译器都出现的编译问题.它发生在我调用一个内联函数时,它本身调用了一个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)
当我删除任何内联语句时,编译器错误消失.我在做什么有什么误解吗?谢谢你的帮助.
归档时间: |
|
查看次数: |
199 次 |
最近记录: |