Fariborz Jahanian | b2f8121 | 2010-02-25 18:24:33 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | // radar 7682116 |
| 3 | |
| 4 | @interface Super @end |
| 5 | |
| 6 | @interface NSArray : Super @end |
| 7 | @interface NSSet : Super @end |
| 8 | |
| 9 | @protocol MyProtocol |
| 10 | - (void)myMethod; |
| 11 | @end |
| 12 | |
| 13 | @protocol MyProtocol2 <MyProtocol> |
| 14 | - (void)myMethod2; |
| 15 | @end |
| 16 | |
| 17 | @interface NSArray() <MyProtocol2> |
| 18 | @end |
| 19 | |
| 20 | @interface NSSet() <MyProtocol> |
| 21 | @end |
| 22 | |
| 23 | int 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 | |