Can anyone with Delphi 10.1 check if this gives an internal compiler error? I only have Delphi 10.

Can anyone with Delphi 10.1 check if this gives an internal compiler error? I only have Delphi 10.


uses
System.SysUtils;

type
Func = reference to function(const Arg1: T): TResult;

// various algorithms
Alg = record
class function Transform(const F: Func): TArray; overload; static;
end;

class function Alg.Transform(const F: Func): TArray;
begin

end;

// adding another overload of Trim breaks the compiler
// in my case it was due to System.AnsiStrings.Trim()
function Trim(const S: integer): integer; overload;
begin
end;

begin
Alg.Transform(Trim); // F2084 Internal Error: AV00000000-R00000000-0
end.

Comments

Post a Comment