mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 18:47:56 +02:00
29 lines
360 B
ObjectPascal
29 lines
360 B
ObjectPascal
program fpc_procedural_type_bug;
|
|
|
|
{$mode objfpc}
|
|
|
|
type
|
|
|
|
tproc = procedure(const aparam : string);
|
|
|
|
tobj = class
|
|
class procedure proc(const aparam : string); static;
|
|
end;
|
|
|
|
var
|
|
s: string;
|
|
|
|
class procedure tobj.proc(const aparam : string);
|
|
begin
|
|
s:=aparam;
|
|
end;
|
|
|
|
var
|
|
p : tproc;
|
|
begin
|
|
p := @tobj.proc;
|
|
p('abc');
|
|
if s<>'abc' then
|
|
halt(1);
|
|
end.
|