blob: da83c8338c157213d9bbf5c38897c7158cf5e728 [file] [log] [blame]
Fariborz Jahanian21121902011-08-08 18:03:17 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2// rdar://6191214
3
4@protocol Xint
5-(void) setX: (int) arg0; // expected-note 3 {{previous definition is here}}
6+(int) C; // expected-note 3 {{previous definition is here}}
7@end
8
9@protocol Xfloat
10-(void) setX: (float) arg0; // expected-warning 3 {{conflicting parameter types in declaration of 'setX:': 'int' vs 'float'}}
11+(float) C; // expected-warning 3 {{conflicting return type in declaration of 'C': 'int' vs 'float'}}
12@end
13
14@interface A <Xint, Xfloat> // expected-note {{class is declared here}}
15@end
16
17@implementation A
18-(void) setX: (int) arg0 { }
19+(int) C {return 0; }
20@end
21
22@interface B <Xfloat, Xint> // expected-note {{class is declared here}}
23@end
24
25@implementation B
26-(void) setX: (float) arg0 { }
27+ (float) C {return 0.0; }
28@end
29
30@protocol Xint_float<Xint, Xfloat>
31@end
32
33@interface C<Xint_float> // expected-note {{class is declared here}}
34@end
35
36@implementation C
37-(void) setX: (int) arg0 { }
38+ (int) C {return 0;}
39@end