Fariborz Jahanian | 46ed4d9 | 2013-04-24 23:23:47 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s |
| 2 | // rdar://12233858 |
| 3 | |
| 4 | @protocol P |
| 5 | @end |
| 6 | |
| 7 | @interface I @end |
| 8 | |
Ismail Pazarbasi | 025f428 | 2014-03-07 22:36:23 +0000 | [diff] [blame] | 9 | @implementation I<P> @end // expected-error {{@implementation declaration cannot be protocol qualified}} |
Fariborz Jahanian | 46ed4d9 | 2013-04-24 23:23:47 +0000 | [diff] [blame] | 10 | |
| 11 | @interface J < P,P > |
| 12 | @end |
| 13 | |
| 14 | |
Ismail Pazarbasi | 025f428 | 2014-03-07 22:36:23 +0000 | [diff] [blame] | 15 | @implementation J < P,P > // expected-error {{@implementation declaration cannot be protocol qualified}} |
Fariborz Jahanian | 46ed4d9 | 2013-04-24 23:23:47 +0000 | [diff] [blame] | 16 | @end |
| 17 | |
| 18 | @interface K @end |
| 19 | |
Douglas Gregor | 85f3f95 | 2015-07-07 03:57:15 +0000 | [diff] [blame] | 20 | @implementation K <P // expected-error {{@implementation declaration cannot be protocol qualified}} expected-note{{to match this '<'}} |
Fariborz Jahanian | 46ed4d9 | 2013-04-24 23:23:47 +0000 | [diff] [blame] | 21 | @end // expected-error {{expected '>'}} |
Fariborz Jahanian | 8588855 | 2013-05-17 17:58:11 +0000 | [diff] [blame] | 22 | |
| 23 | // rdar://13920026 |
Ismail Pazarbasi | 025f428 | 2014-03-07 22:36:23 +0000 | [diff] [blame] | 24 | @implementation I (Cat) <P> // expected-error {{@implementation declaration cannot be protocol qualified}} |
Fariborz Jahanian | 8588855 | 2013-05-17 17:58:11 +0000 | [diff] [blame] | 25 | - (void) Meth {} |
| 26 | @end |
| 27 | |
Ismail Pazarbasi | 025f428 | 2014-03-07 22:36:23 +0000 | [diff] [blame] | 28 | @implementation I (Cat1) <P // expected-error {{@implementation declaration cannot be protocol qualified}} |
Fariborz Jahanian | 8588855 | 2013-05-17 17:58:11 +0000 | [diff] [blame] | 29 | @end // expected-error {{expected '>'}} |