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

{$mode delphi}

type
  TGenericClass<T1,T2> = class
    function DoSomething(Arg: T1): T1;
  end;

// it must be TGenericClass<T1,T2>
function TGenericClass<T1>.DoSomething(Arg: T1): T1;
begin
  Result := Arg;
end;

begin
end.