git-svn-id: branches/paul/extended_records@16569 -
@@ -29,5 +29,8 @@ begin
F.P5 := 8;
if F.P5 <> 8 then
halt(8);
+ // test Self
+ F.Test2;
+ F.Test3;
WriteLn('ok');
end.
@@ -32,8 +32,13 @@ type
class constructor Create;
class destructor Destroy;
+
+ procedure Test2;
+ procedure Test3;
end;
+procedure Test4(AFoo: TFoo);
implementation
function TFoo.Test(n: TBar): TBar;
@@ -66,4 +71,25 @@ begin
F5 := Value;
+procedure TFoo.Test2;
+begin
+ if Self.C <> 1 then
+ halt(50);
+ if Self.F3 <> 7 then
+ halt(51);
+end;
+procedure TFoo.Test3;
+ Test4(Self);
+ if AFoo.C <> 1 then
+ halt(100);
+ if AFoo.P3 <> 7 then
+ halt(101);