2013-04-25 07:23:47 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s
|
|
|
|
// rdar://12233858
|
|
|
|
|
|
|
|
@protocol P
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I @end
|
|
|
|
|
2014-03-08 06:36:23 +08:00
|
|
|
@implementation I<P> @end // expected-error {{@implementation declaration cannot be protocol qualified}}
|
2013-04-25 07:23:47 +08:00
|
|
|
|
|
|
|
@interface J < P,P >
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
2014-03-08 06:36:23 +08:00
|
|
|
@implementation J < P,P > // expected-error {{@implementation declaration cannot be protocol qualified}}
|
2013-04-25 07:23:47 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface K @end
|
|
|
|
|
2020-03-28 09:50:02 +08:00
|
|
|
@implementation K <P // expected-error {{@implementation declaration cannot be protocol qualified}} expected-error {{expected '>'}} expected-note {{to match this '<'}}
|
|
|
|
@end
|
2013-05-18 01:58:11 +08:00
|
|
|
|
|
|
|
// rdar://13920026
|
2014-03-08 06:36:23 +08:00
|
|
|
@implementation I (Cat) <P> // expected-error {{@implementation declaration cannot be protocol qualified}}
|
2013-05-18 01:58:11 +08:00
|
|
|
- (void) Meth {}
|
|
|
|
@end
|
|
|
|
|
2020-03-28 09:50:02 +08:00
|
|
|
@implementation I (Cat1) <P // expected-error {{@implementation declaration cannot be protocol qualified}} expected-error {{expected '>'}} expected-note {{to match this '<'}}
|
|
|
|
@end
|