Generics "class" constraint - wrong behavior
Original Reporter info from Mantis: hnb
-
Reporter name: Maciej Izak
Original Reporter info from Mantis: hnb
- Reporter name: Maciej Izak
Description:
I can't compile attached code:
{$mode delphi}
type
TA<T: class> = class
public
procedure Foo(const AValue: T);
end;
procedure TA<T>.Foo(const AValue: T);
begin
AValue.Free; // Error: identifier idents no member "Free"
end;
Mantis conversion info:
- Mantis ID: 24458
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 24458 (#dce960c9)