mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 06:08:16 +02:00
* new delphi probs
This commit is contained in:
parent
d3533891fe
commit
51a3acb6fe
28
tests/tbs/tb0422.pp
Normal file
28
tests/tbs/tb0422.pp
Normal file
@ -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
tests/tbs/tb0423.pp
Normal file
13
tests/tbs/tb0423.pp
Normal file
@ -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.
|
Loading…
Reference in New Issue
Block a user