fpc/tests/tbs/tb0595.pp
Jonas Maebe 0ad9f345dd * handle explicit typecasts of procdefs to procvardefs always via
proc_to_procdef, because a methodpointer may have to be discarded

git-svn-id: trunk@23929 -
2013-03-19 13:23:51 +00:00

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.