blob: 01d4983936e5c41aa21f8e1d473c83088e0b94c6 (
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
48
49
50
51
|
{$mode objfpc}
type
ta = byte;
pa = ^byte;
panother = pa;
type
tRec = record
a : ta;
p : panother;
end;
tNestedObj = object
arec : tRec;
p : panother;
end;
tChildObj = object(tNestedObj)
dummy : byte;
end;
type
tObj = object
arec : tRec;
aobj : tNestedObj;
achild : tChildObj;
property a_rec : byte read arec.a;
property a_obj : byte read aobj.arec.a;
property p_obj : pa read aobj.p;
property dummy_child : byte read achild.dummy;
property a_child : byte read achild.arec.a;
{ Error: Unknown record field identifier "arec" ^
Error: Unknown record field identifier "a" ^
}
property p_child : pa read achild.p;
{ Error: Unknown record field identifier "p" ^
}
end;
var
Obj : tObj;
begin
Obj.achild.p:=panother($deadbeef);
if Obj.p_child<>panother($deadbeef) then
halt(1);
writeln('ok');
end.
|