mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 15:28:08 +02:00
28 lines
487 B
ObjectPascal
28 lines
487 B
ObjectPascal
{ %target=darwin }
|
|
{ %cpu=powerpc,powerpc64,i386,x86_64,arm,aarch64 }
|
|
{ %fail }
|
|
|
|
{ Written by Jonas Maebe in 2009, released into the public domain }
|
|
|
|
{$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.
|