type
TForm72 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
TTestForm = class(TForm)
public
constructor CreateTest(AOwner: TComponent); virtual;
end;
TTestForm1 = class(TTestForm)
public
constructor CreateTest(AOwner: TComponent); override;
end;
TTest<T: TTestForm, constructor> = class(TObject)
public
class procedure Test;
end;
var
Form72: TForm72;
implementation
{$R *.dfm}
procedure TForm72.FormCreate(Sender: TObject);
begin
TTest<TTestForm1>.Test;
end;
{ TTest<T> }
class procedure TTest<T>.Test;
var
F: T;
begin
F := T.CreateTest(Application);
Form72.Caption := F.Name;
end;
{ TTestForm }
constructor TTestForm.CreateTest(AOwner: TComponent);
begin
inherited Create(AOwner);
end;
{ TTestForm1 }
constructor TTestForm1.CreateTest(AOwner: TComponent);
begin
inherited;
Caption := 'Bang';
end;
end.
このコードはXE2でコンパイルされましたが、XE3の「[dcc32エラー] Unit71.pas(55):E2010互換性のないタイプ:'T'および'プロシージャ、型なしポインタ、または型なしパラメータ'」で失敗します。私が間違ったこと、またはコンパイラが間違ったことはありますか?