unit ugenconstraints; {$ifdef fpc} {$mode delphi} {$else} // Delphi only knows "MSWINDOWS" {$define windows} {$endif} interface type TTestClass = class end; TTestClass2 = class(TTestClass) end; TTestRec = record end; ITest1 = interface end; ITest2 = interface(ITest1) end; TTestClass3 = class(TInterfacedObject, ITest1) end; TTestClass4 = class(TInterfacedObject, ITest1, ITest2) end; TTestClass5 = class(TInterfacedObject, ITest2) end; TTestClass6 = class(TTestClass3, ITest2) end; TTestClass7 = class(TTestClass, ITest1) function QueryInterface({$IFDEF FPC}constref{$ELSE}const{$ENDIF} iid : tguid;out obj) : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; function _AddRef : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; function _Release : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; end; TTestClass8 = class(TTestClass7, ITest2) end; TTestClass9 = class(TTestClass, ITest2) function QueryInterface({$IFDEF FPC}constref{$ELSE}const{$ENDIF} iid : tguid;out obj) : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; function _AddRef : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; function _Release : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}; end; TTestObject1 = object end; type TTest1 = class end; TTest2 = class end; TTest3 = class end; TTest4 = class end; TTest5 = class end; TTest6 = class end; TTest7 = class end; TTest8 = class end; TTest9 = class end; TTest10 = class end; TTest11 = class end; TTest12 = class end; TTest13 = class end; TTest14 = class end; TTest15 = class end; TTest16 = class end; TTest17 = class end; TTest18 = class end; TTest19 = class end; TTest20 = class end; TTest21 = class end; implementation function TTestClass7.QueryInterface({$IFDEF FPC}constref{$ELSE}const{$ENDIF} iid : tguid;out obj) : longint; begin end; function TTestClass7._AddRef : longint; begin end; function TTestClass7._Release : longint; begin end; function TTestClass9.QueryInterface({$IFDEF FPC}constref{$ELSE}const{$ENDIF} iid : tguid;out obj) : longint; begin end; function TTestClass9._AddRef : longint; begin end; function TTestClass9._Release : longint; begin end; end.