Browse Source

no message

florian 25 years ago
parent
commit
2b4b2470e4
1 changed files with 31 additions and 0 deletions
  1. 31 0
      tests/test/testitf1.pp

+ 31 - 0
tests/test/testitf1.pp

@@ -0,0 +1,31 @@
+{$mode objfpc}
+type
+  IInterface = interface(IUnknown)
+     procedure mydo;
+  end;
+
+  TMyClass = class(TInterfacedObject, IInterface)
+     procedure mydo;virtual;
+  end;
+
+var
+   l : longint;
+
+procedure tmyclass.mydo;
+
+  begin
+     l:=1;
+  end;
+
+var
+  c: TMyClass;
+  i: IInterface;
+
+begin
+  c := TMyClass.Create;
+  i := c;
+  l:=0;
+  i.mydo;
+  if l<>1 then
+    halt(1);
+end.