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