• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2// expected-no-diagnostics
3// 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
32