repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Sync usage with man page.
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
objc
/
execute
/
cascading-1.m
blob
67988a5db2a859ae3027dd84afcada2df3fa0263
1
#include <objc/Object.h>
2
3
@interface Foo : Object
4
+ foo;
5
+ bar;
6
@end
7
8
int foocalled = 0;
9
int barcalled = 0;
10
11
12
@implementation Foo
13
+ foo
14
{
15
if (foocalled)
16
abort ();
17
foocalled = 1;
18
return self;
19
}
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 foo] bar];
32
return 0;
33
}