brintos

brintos / llvm-project-archived public Read only

0
0
Text · 538 B · baf81f9 Raw
31 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4@interface Super @end5 6@interface NSArray : Super @end7@interface NSSet : Super @end8 9@protocol MyProtocol10- (void)myMethod;11@end12 13@protocol MyProtocol2 <MyProtocol>14- (void)myMethod2;15@end16 17@interface NSArray() <MyProtocol2>18@end19 20@interface NSSet() <MyProtocol>21@end22 23int main (int argc, const char * argv[]) {24    NSArray *array = (void*)0;25    NSSet *set = (void*)0;26    id <MyProtocol> instance = (argc) ? array : set;27    instance = (void*)0;28    return 0;29}30 31