Debian Codegraph @

gcc/testsuite/objc/execute/function-message-1.m

raw
1 #include "../../objc-obj-c++-shared/TestsuiteObject.m"
2
3 @interface Foo : TestsuiteObject
4 + bar;
5 @end
6
7 int foocalled = 0;
8 int barcalled = 0;
9
10
11 id foo()
12 {
13 if (foocalled)
14 abort ();
15 foocalled = 1;
16 return [Foo class];
17 }
18
19 @implementation Foo
20 + bar
21 {
22 if (barcalled)
23 abort ();
24 barcalled = 1;
25 return self;
26 }
27 @end
28
29 int main(int argc,char **argv)
30 {
31 [foo() bar];
32 return 0;
33 }