Fariborz Jahanian | 51c30af | 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 | |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 9 | @implementation I<P> @end // expected-error {{@implementation declaration cannot be protocol qualified}} |
Fariborz Jahanian | 51c30af | 2013-04-24 23:23:47 +0000 | [diff] [blame] | 10 | |
| 11 | @interface J < P,P > |
| 12 | @end |
| 13 | |
| 14 | |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 15 | @implementation J < P,P > // expected-error {{@implementation declaration cannot be protocol qualified}} |
Fariborz Jahanian | 51c30af | 2013-04-24 23:23:47 +0000 | [diff] [blame] | 16 | @end |
| 17 | |
| 18 | @interface K @end |
| 19 | |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 20 | @implementation K <P // expected-error {{@implementation declaration cannot be protocol qualified}} |
Fariborz Jahanian | 51c30af | 2013-04-24 23:23:47 +0000 | [diff] [blame] | 21 | @end // expected-error {{expected '>'}} |
Fariborz Jahanian | e4bb749 | 2013-05-17 17:58:11 +0000 | [diff] [blame] | 22 | |
| 23 | // rdar://13920026 |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 24 | @implementation I (Cat) <P> // expected-error {{@implementation declaration cannot be protocol qualified}} |
Fariborz Jahanian | e4bb749 | 2013-05-17 17:58:11 +0000 | [diff] [blame] | 25 | - (void) Meth {} |
| 26 | @end |
| 27 | |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 28 | @implementation I (Cat1) <P // expected-error {{@implementation declaration cannot be protocol qualified}} |
Fariborz Jahanian | e4bb749 | 2013-05-17 17:58:11 +0000 | [diff] [blame] | 29 | @end // expected-error {{expected '>'}} |