summaryrefslogtreecommitdiff
path: root/tests/test/tgenconstraint37.pp
blob: a9d46c211b2302bbfe28058cc1ad74eb9eadf564 (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
{ %NORUN }

program tgenconstraint37;

{$mode objfpc}

type
  generic TGenericTObject<T: TObject> = class
  end;

  generic TGenericClass<T: class> = class
  end;

  generic TGenericIInterface<T: IInterface> = class
  end;

  TTestObject = class;
  ITestInterface = interface;


  TGenericTObjectTTestObject = specialize TGenericTObject<TTestObject>;

  TGenericClassTTestObject = specialize TGenericClass<TTestObject>;

  TGenericIInterfaceITestInterface = specialize TGenericIInterface<ITestInterface>;


  TTestObject = class
  end;

  ITestInterface = interface
  end;

begin
end.