summaryrefslogtreecommitdiff
path: root/tests/webtbs/uw34287b.pp
blob: 78c86c19ac34756d3c94ff74fdc1bce91a7b008e (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
unit uw34287b;

{$IFDEF FPC}
 {$MODE OBJFPC}{$H+}
{$ENDIF}

interface

uses
  Classes;

type
  TBase = class(TComponent)
  public
    generic function Bar<T: TComponent>(const P1: string; out P2: T): Boolean;
  end;

  TFoo = class(TBase)
  public
    function Bar(const P1: string): Boolean;
  end;

implementation

generic function TBase.Bar<T>(const P1: string; out P2: T): Boolean;
begin
  Result := False;
end;

function TFoo.Bar(const P1: string): Boolean;
var
  C: TComponent;
begin
  Result := inherited specialize Bar<TComponent>(P1, C);
end;

end.