summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0181.pp
blob: 8fab3e22267515a60c30cd4a623398d8810075be (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
28
29
{ Old file: tbs0214.pp }
{ bugs for static methods                               OK 0.99.11 (PM) }

Program SttcTest;
{ Note: I've cut a lot out of this program, it did originally have
        constructors, destructors and instanced objects, but this
        is the minimum required to produce the problem, and I think
        that this should work, unless I've misunderstood the use of
        the static keyword. }
Type
   TObjectType1 = Object
      Procedure Setup; static;
      Procedure Weird; static;
   End;

Procedure TObjectType1.Setup;
   Begin
   End;

Procedure TObjectType1.Weird;
   Begin
   End;

Begin
   TObjectType1.Setup;
   TObjectType1.Weird;
   TObjectType1.Weird; // GPFs before exiting "Weird"
   Writeln('THE END.');
End.