fpc/tests/test/tobjc28.pp
2009-11-16 00:12:08 +00:00

26 lines
410 B
ObjectPascal

{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
{ %fail }
{$modeswitch objectivec1}
type
ta = objcclass(NSObject)
end;
ca = objccategory(ta)
procedure categorymethod; message 'categorymethod';
end;
procedure ca.categorymethod;
begin
end;
var
a: NSObject;
begin
a:=ta(ta.alloc).init;
{ should fail because the category is for ta, not for nsobject }
a.categorymethod;
end.