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