blob: c5d3ae3aec14bbc1bd71f2fe6c43e348f2491342 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{$ifdef FPC}
{$mode macpas}
{$endif}
{$ifdef __GPC__}
{$mac-objects}
{$endif}
program withtest2;
type obj = object i: integer end;
var p, q, r: obj;
begin
new( p);
new( q);
p.i:= 1;
q.i:= 2;
r:= p;
with r do
begin
r:=q;
writeln( i);
if (i<>1) then
halt(1);
end
end.
|