Fariborz Jahanian | a36f3ed | 2010-05-03 21:06:59 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | @protocol Proto1 @end |
| 4 | |
| 5 | @protocol Proto2 @end |
| 6 | |
| 7 | void f(id<Proto1> *) { } // expected-note {{previous definition is here}} |
| 8 | |
| 9 | void f(id<Proto1, Proto2> *) { } // expected-error {{conflicting types for 'f'}} |
| 10 | |
| 11 | void f(Class<Proto1> *) { } // expected-note {{previous definition is here}} |
| 12 | |
| 13 | void f(Class<Proto1, Proto2> *) { } // expected-error {{conflicting types for 'f'}} |
| 14 | |
| 15 | @interface I @end |
| 16 | |
| 17 | void f(I<Proto1> *) { } // expected-note {{previous definition is here}} |
| 18 | |
| 19 | void f(I<Proto1, Proto2> *) { } // expected-error {{conflicting types for 'f'}} |
| 20 | |
| 21 | @interface I1 @end |
| 22 | |
| 23 | void f1(I<Proto1> *) { } |
| 24 | |
| 25 | void f1(I1<Proto1, Proto2> *) { } |