summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw2480.pp
blob: d2dde58a0e5238e76836f276319bf53b1a0dc20f (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
{ Source provided for Free Pascal Bug Report 2480 }
{ Submitted by "Sergey Kosarevsky" on  2003-05-01 }
{ e-mail: netsurfer@au.ru }
{$mode objfpc}

Type tSingleton=Class
       Private
        _Instance:tSingleton;Static;
       Public
        Constructor Init;
        Class Function Instance:tSingleton;
     End;

class Function tSingleton.Instance:tSingleton;
Begin
   If _Instance=Nil Then _Instance:=tSingleton.Init;
   Exit(_Instance);
End;

Constructor tSingleton.Init;
Begin
End;

Begin
End.