Browse Source

* new inherited; test

peter 25 years ago
parent
commit
471d004bc3
2 changed files with 47 additions and 1 deletions
  1. 17 1
      tests/tbs/tbs0319.pp
  2. 30 0
      tests/test/testinh.pp

+ 17 - 1
tests/tbs/tbs0319.pp

@@ -20,17 +20,33 @@ type
      end;
      end;
 
 
  o2 = class
  o2 = class
-       nonsense  :longint;
+       nonsense  :string;
+       procedure flop;
        procedure flup(nonsense:longint);
        procedure flup(nonsense:longint);
+       procedure flup2(flop:longint);
      end;
      end;
 
 
 procedure o.flup(nonsense:string);
 procedure o.flup(nonsense:string);
 begin
 begin
 end;
 end;
 
 
+procedure o2.flop;
+begin
+end;
 
 
 procedure o2.flup(nonsense:longint);
 procedure o2.flup(nonsense:longint);
+var
+  l : longint;
+begin
+  l:=nonsense;
+end;
+
+procedure o2.flup2(flop:longint);
+var
+  l : longint;
 begin
 begin
+  l:=flop;
+  flup(flop);
 end;
 end;
 
 
 
 

+ 30 - 0
tests/test/testinh.pp

@@ -0,0 +1,30 @@
+{$ifdef fpc}
+   {$mode delphi}
+{$endif}
+type
+  TMyComponent = class
+  public
+    constructor Create(k1:longint;k2: shortstring);
+    destructor Destroy;override;
+  end;
+
+  TMyComponent1 = class(TMyComponent)
+  public
+    constructor Create(l1:longint;l2:shortstring);
+  end;
+
+constructor TMyComponent.Create(k1:longint;k2:shortstring);
+begin
+end;
+
+destructor TMyComponent.Destroy;
+begin
+end;
+
+constructor TMyComponent1.Create(l1:longint;l2:shortstring);
+begin
+  inherited;
+end;
+
+begin
+end.