* small extension of the test

git-svn-id: trunk@26066 -
This commit is contained in:
Jonas Maebe 2013-11-12 10:30:28 +00:00
parent 897c8b8f7b
commit 3e393b867b

View File

@ -20,6 +20,11 @@ type
procedure extraproc(a: longint); override;
end;
MyObject2 = objcclass(NSObject)
// overrides extraproc added to NSObject
procedure extraproc(a: longint); override;
end;
procedure MyCategory.extraproc(a: longint);
begin
if a<>1 then
@ -33,10 +38,18 @@ procedure MyObject.extraproc(a: longint);
inherited extraproc(1);
end;
procedure MyObject2.extraproc(a: longint);
begin
if a<>3 then
halt(3);
inherited extraproc(1);
end;
var
a: NSObject;
b: MyObject;
c: MyObject2;
begin
a:=NSObject.alloc.init;
a.extraproc(1);
@ -44,4 +57,7 @@ begin
b:=MyObject.alloc.init;
b.extraproc(2);
b.release;
c:=MyObject.alloc.init;
c.extraproc(2);
c.release;
end.