blob: 650a5a9a9073d6fe9771d1b59fcd55df412482d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
{ %norun }
{$mode objfpc}
unit ub0569;
interface
type
generic TGen<T> = class
function getstring : string;
function getwidestring : widestring;
function getint : int64;
function getreal : real;
end;
implementation
function TGen.getstring : string;
begin
result:='Free Pascal';
end;
function TGen.getwidestring : widestring;
begin
{ force widestring }
result:='Free Pascal'#1234;
end;
function TGen.getint : int64;
begin
result:=1234123412341234;
end;
function TGen.getreal : real;
begin
result:=333.0;
end;
end.
|