mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 15:29:16 +02:00

proc_to_procdef, because a methodpointer may have to be discarded git-svn-id: trunk@23929 -
26 lines
270 B
ObjectPascal
26 lines
270 B
ObjectPascal
{$mode delphi}{$h+}
|
|
|
|
type
|
|
tc = class
|
|
class procedure test; static;
|
|
end;
|
|
|
|
tp = procedure;
|
|
|
|
var
|
|
global: longint;
|
|
|
|
class procedure tc.test;
|
|
begin
|
|
global:=1;
|
|
end;
|
|
|
|
var
|
|
p: tp;
|
|
begin
|
|
p:=tp(tc.test);
|
|
p();
|
|
if global<>1 then
|
|
halt(1);
|
|
end.
|