blob: 664737223e67ba50f57db63a33b3e2eb790d70a1 [file] [log] [blame]
Fariborz Jahanian51c30af2013-04-24 23:23:47 +00001// 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 Hines651f13c2014-04-23 16:59:28 -07009@implementation I<P> @end // expected-error {{@implementation declaration cannot be protocol qualified}}
Fariborz Jahanian51c30af2013-04-24 23:23:47 +000010
11@interface J < P,P >
12@end
13
14
Stephen Hines651f13c2014-04-23 16:59:28 -070015@implementation J < P,P > // expected-error {{@implementation declaration cannot be protocol qualified}}
Fariborz Jahanian51c30af2013-04-24 23:23:47 +000016@end
17
18@interface K @end
19
Stephen Hines651f13c2014-04-23 16:59:28 -070020@implementation K <P // expected-error {{@implementation declaration cannot be protocol qualified}}
Fariborz Jahanian51c30af2013-04-24 23:23:47 +000021@end // expected-error {{expected '>'}}
Fariborz Jahaniane4bb7492013-05-17 17:58:11 +000022
23// rdar://13920026
Stephen Hines651f13c2014-04-23 16:59:28 -070024@implementation I (Cat) <P> // expected-error {{@implementation declaration cannot be protocol qualified}}
Fariborz Jahaniane4bb7492013-05-17 17:58:11 +000025- (void) Meth {}
26@end
27
Stephen Hines651f13c2014-04-23 16:59:28 -070028@implementation I (Cat1) <P // expected-error {{@implementation declaration cannot be protocol qualified}}
Fariborz Jahaniane4bb7492013-05-17 17:58:11 +000029@end // expected-error {{expected '>'}}