summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0306.pp
blob: 941c3b9ac41c4d07b13b452ba395a545ffdced99 (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
{$mode objfpc}

type
   tobject2 = class
      constructor create;
      function rname : string;
      procedure wname(const s : string);
      property name : string read rname write wname;
   end;

   tclass2 = class of tobject2;

var
   o2 : tobject2;
   c2 : tclass2;

constructor tobject2.create;

  begin
     inherited create;
  end;

procedure tobject2.wname(const s : string);

  begin
  end;

function tobject2.rname : string;

  begin
  end;

begin
   o2:=tobject2.create;
   o2.name:='1234';
   writeln(o2.name);
   o2.destroy;
   c2:=tobject2;
   o2:=c2.create;
   o2.destroy;
end.