blob: c0d2f8b0710fd9053e6de898d6fa17d138c01106 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
{ %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.
|