Registriert seit: 12. Aug 2003
Ort: Soest
4.027 Beiträge
Delphi 10.1 Berlin Enterprise
|
AW: Helfer funktioniert nicht bei statischen Record-Methoden
17. Jul 2015, 19:46
Delphi-Quellcode:
type
TSomeRecord = record
strict private class procedure StaticMethod(); static;
end;
TSomeRecordHelper = record helper for TSomeRecord
private procedure __StaticMethod(); inline;
public class procedure _StaticMethod(); static; inline;
end;
{ TSomeRecord }
class procedure TSomeRecord.StaticMethod();
begin
//
end;
{ TSomeRecordHelper }
class procedure TSomeRecordHelper._StaticMethod();
var
Self: TSomeRecord;
begin
Self.__StaticMethod;
end;
procedure TSomeRecordHelper.__StaticMethod;
begin
TSomeRecord.StaticMethod;
end;
Geändert von Stevie (17. Jul 2015 um 19:52 Uhr)
|