Is there a way to make something like this work?
program Project1;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
type
TMyRecord = record
class operator Explicit(const a: array of integer): TMyRecord;
end;
{ TMyRecord }
class operator TMyRecord.Explicit(const a: array of integer): TMyRecord;
begin
end;
var
a: array[0..100] of integer;
begin
TMyRecord(a); //Incompatible types: 'array of Integer' and 'array[0..100] of Integer
end.
"TMyRecord.Explicit(const a: TIntegerDynArray)" works for TIntegerDynArray, but I can't get static arrays to work.