Can't determine which overloaded function to call for generic version of code
Original Reporter info from Mantis: hnb
-
Reporter name: Maciej Izak
Original Reporter info from Mantis: hnb
- Reporter name: Maciej Izak
Description:
For non-generic code all works fine, but generic version raise error:
b004.lpr(8,30) Error: Can't determine which overloaded function to call.
Non generic version attached as: nongeneric.zip (nong004.lpr and nong004u01.pas)
Generic version attached as: generic.zip (b004.lpr and b004u01.pas)
======b004u01.pas======
unit b004u01;
{$mode delphi}
interface
type
IA<T> = interface
end;
IB<T> = interface
end;
TA<T> = class(TInterfacedObject, IA<T>, IB<T>)
end;
TB<T> = class
protected
constructor Create(A: IA<T>); virtual; abstract; overload;
public
constructor Create(B: IB<T>); virtual; abstract; overload;
end;
TC<T> = class
class var F: TA<T>;
end;
implementation
end.
======b004.lpr======
program b004;
{$MODE DELPHI}
uses b004u01;
begin
TB<Byte>.Create(TC<Byte>.F);
end.
Mantis conversion info:
- Mantis ID: 26181
- Version: 2.7.1