summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/tclass12b.pp
blob: f178c9a70430373c14e8ba9240137b2835a7b73e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ %FAIL}
program tclass12b;
{$ifdef fpc}
  {$mode delphi}
{$endif}
{$apptype console}

type
  TSomeClass = class
  strict private
    const
      PrivateConst = 3.14;
  end;

  TAnotherClass = class(TSomeClass)
  public
    class procedure WritePrivateConst; static;
  end;

  class procedure TAnotherClass.WritePrivateConst;
  begin
    WriteLn(PrivateConst)
  end;

begin
  TAnotherClass.WritePrivateConst
end.