mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 16:47:53 +02:00
34 lines
382 B
ObjectPascal
34 lines
382 B
ObjectPascal
program StaticClassProc;
|
|
|
|
{$MODE OBJFPC}
|
|
|
|
type
|
|
TTest = class
|
|
public type
|
|
TProcedure = procedure;
|
|
private
|
|
class procedure MyProc; static;
|
|
public
|
|
constructor Create;
|
|
end;
|
|
|
|
{ TTest }
|
|
|
|
constructor TTest.Create;
|
|
var
|
|
aProc: TProcedure;
|
|
begin
|
|
aProc := @MyProc;
|
|
aProc;
|
|
end;
|
|
|
|
class procedure TTest.MyProc;
|
|
begin
|
|
Writeln('OK');
|
|
end;
|
|
|
|
begin
|
|
TTest.Create;
|
|
end.
|
|
|