diff --git a/tests/tbs/tb0422.pp b/tests/tbs/tb0422.pp new file mode 100644 index 0000000000..ddea88f3a1 --- /dev/null +++ b/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. diff --git a/tests/tbs/tb0423.pp b/tests/tbs/tb0423.pp new file mode 100644 index 0000000000..74b14fc063 --- /dev/null +++ b/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.