mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 03:08:20 +02:00

- implement class properties: properties which can access only static fields and static class methods - tests - fix a possibility to call an instance method from the class method git-svn-id: trunk@14585 -
32 lines
360 B
ObjectPascal
32 lines
360 B
ObjectPascal
{ %FAIL}
|
|
program tstatic4;
|
|
{$APPTYPE console}
|
|
{$ifdef fpc}
|
|
{$mode delphi}{$H+}
|
|
{$endif}
|
|
|
|
type
|
|
|
|
{ TSomeClass }
|
|
|
|
TSomeClass = class
|
|
public
|
|
class procedure StaticProc; static;
|
|
procedure RegularProc;
|
|
end;
|
|
|
|
|
|
{ TSomeClass }
|
|
|
|
procedure TSomeClass.RegularProc;
|
|
begin
|
|
|
|
end;
|
|
|
|
class procedure TSomeClass.StaticProc;
|
|
begin
|
|
RegularProc;
|
|
end;
|
|
|
|
begin
|
|
end. |