Browse Source

*** empty log message ***

florian 23 years ago
parent
commit
8af1cb19ee
1 changed files with 11 additions and 0 deletions
  1. 11 0
      tests/test/tinterface1.pp

+ 11 - 0
tests/test/tinterface1.pp

@@ -10,6 +10,10 @@ type
      procedure mydo;virtual;
   end;
 
+  TMyClass2 = class(TMyClass)
+     i : integer;
+  end;
+
 var
    l : longint;
 
@@ -22,6 +26,7 @@ procedure tmyclass.mydo;
 var
   c: TMyClass;
   i: IInterface;
+  c2 : TMyClass;
 
 begin
   c := TMyClass.Create;
@@ -30,4 +35,10 @@ begin
   i.mydo;
   if l<>1 then
     halt(1);
+  c2 := TMyClass2.Create;
+  i := c2;
+  l:=0;
+  i.mydo;
+  if l<>1 then
+    halt(1);
 end.