blob: 5b4a8632b27f5f9fb6207a228ccc1507267ffc5e [file] [log] [blame]
Fariborz Jahanianb2f81212010-02-25 18:24:33 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Fariborz Jahanianb2f81212010-02-25 18:24:33 +00003// radar 7682116
4
5@interface Super @end
6
7@interface NSArray : Super @end
8@interface NSSet : Super @end
9
10@protocol MyProtocol
11- (void)myMethod;
12@end
13
14@protocol MyProtocol2 <MyProtocol>
15- (void)myMethod2;
16@end
17
18@interface NSArray() <MyProtocol2>
19@end
20
21@interface NSSet() <MyProtocol>
22@end
23
24int main (int argc, const char * argv[]) {
25 NSArray *array = (void*)0;
26 NSSet *set = (void*)0;
27 id <MyProtocol> instance = (argc) ? array : set;
28 instance = (void*)0;
29 return 0;
30}
31