Skip to content

Cannot call generic method in exception

program Project1;

{$mode delphi}

uses
  {$IFDEF UNIX}
  cthreads,
  {$ENDIF}
  Classes
  { you can add units after this };

procedure _Test0<T>(const AParam: T);
begin
end;

procedure _Test<T>(const AValue1, AValue2: T);
begin
  try
    _Test0<T>(AValue1);
  except
    _Test0<T>(AValue2);
  end;
end;

begin
end.

2023-08-22_141756

Edited by Yong Zeng
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information