blob: b066bf60f9f3020026e7f9517231650d569a7c4d (
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
44
45
46
47
|
{$mode objfpc}
type
tobject2 = class
i : longint;
procedure y;
constructor create;
class procedure x;
class procedure v;virtual;
end;
procedure tobject2.y;
begin
Writeln('Procedure y called');
end;
class procedure tobject2.v;
begin
end;
class procedure tobject2.x;
begin
v;
end;
constructor tobject2.create;
begin
end;
type
tclass2 = class of tobject2;
var
a : class of tobject2;
object2 : tobject2;
begin
a:=tobject2;
a.x;
tobject2.x;
object2:=tobject2.create;
object2:=a.create;
end.
|