summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw2318b.pp
blob: b6c10509f23639a99a1f6d0c533c4d8923844a4f (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ %RESULT=210 }

{ Source provided for Free Pascal Bug Report 2318 }
{ Submitted by "Sergey Kosarevsky" on  2003-01-09 }
{ e-mail: netsurfer@au.ru }

{$static on}

{$R+}

Type tObject=Object
        Constructor Init;
        Function GetVMT:Pointer;Static;
        Destructor Done;Virtual;
     End;

Constructor tObject.Init;
Begin
End;

Function tObject.GetVMT:Pointer;
Begin
  GetVMT:=self;
End;


Destructor tObject.Done;
Begin
End;

Var O:tObject;

Begin
   //O.Init;
   { No init done,
     the object check should give an RTE 210 }

   if (O.GetVMT= nil) or (O.getVMT<>tObject.GetVMT) then
     begin
       Writeln('Problem with static methods');
       halt(1);
     end;
End.