Use of Str() inside generic class
Original Reporter info from Mantis: leledumbo_cool@yahoo.co.id @leledumbo
-
Reporter name: Mario Ray Mahardhika
Original Reporter info from Mantis: leledumbo_cool@yahoo.co.id @leledumbo
- Reporter name: Mario Ray Mahardhika
Description:
Why can't I use Str inside generic class with Str first argument is a variable of the generic container. The following unit demonstrate what I mean:
unit genstrtest;
{$mode objfpc}{$H+}
interface
type
generic TGC<T> = class
Value: T;
procedure M;
end;
TGB = specialize TGC<Boolean>;
TGI = specialize TGC<Integer>;
TGS = specialize TGC<String>;
implementation
procedure TGC.M;
var
s: String;
begin
Str(Value,s);
end;
end.
Mantis conversion info:
- Mantis ID: 18420
- OS: win32
- OS Build: 5.1.2600
- Build: 16638
- Platform: i386
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 16849 (#e99c4d19)