2
0
peter 23 жил өмнө
parent
commit
51a3acb6fe

+ 28 - 0
tests/tbs/tb0422.pp

@@ -0,0 +1,28 @@
+{$ifdef fpc}{$mode delphi}{$endif}
+
+type
+  tcl = class
+    function f1 : tvarrec; virtual;
+  end;
+
+var
+   f : function : tvarrec of object;
+
+function tcl.f1 : tvarrec;
+begin
+  fillchar(result,sizeof(result),0);
+end;
+
+
+procedure p1(v : tvarrec);
+  begin
+  end;
+
+
+var
+  c : tcl;
+begin
+   c:=tcl.create;
+   f:=c.f1;
+   p1(f);
+end.

+ 13 - 0
tests/tbs/tb0423.pp

@@ -0,0 +1,13 @@
+{$ifdef fpc}{$mode delphi}{$endif}
+
+type
+   tmethod = record
+      code,data : pointer;
+   end;
+
+var
+   p : procedure(l : longint) of object;
+
+begin
+   tmethod(p).data:=nil;
+end.