Browse Source

+ test for getting the address of virtual methods of a class

Jonas Maebe 23 năm trước cách đây
mục cha
commit
07269c85d8
1 tập tin đã thay đổi với 16 bổ sung0 xóa
  1. 16 0
      tests/tbs/tb0403.pp

+ 16 - 0
tests/tbs/tb0403.pp

@@ -0,0 +1,16 @@
+{$mode objfpc}
+
+type
+  tclass = class
+    procedure t; virtual;
+  end;
+
+procedure tclass.t;
+begin
+end;
+
+var
+  p: pointer;
+begin
+  p := @tclass.t;
+end.