summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/tgeneric30.pp
blob: b128563a4ddd75091e62d2f65c5a2cf21be10b60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ %fail }
program tgeneric30;

{$mode delphi}

type
  TGenericClass<T> = class
    function DoSomething(Arg: T): T;
  end;

// it must be TGenericClass<T> here
function TGenericClass.DoSomething(Arg: T): T;
begin
  Result := Arg;
end;

begin
end.