blob: 6fb28b533cf7721f7dff8179e05b3cfb5188ee79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// RUN: clang -fsyntax-only -verify %s
@protocol PROTO1
@required
- (int) FooBar;
@optional
- (void) MyMethod1;
+ (int) S;
@end
@interface INTF1
@required // expected-error {{@required may be specified in protocols only}}
- (int) FooBar;
- (int) FooBar1;
- (int) FooBar2;
@optional // expected-error {{@optional may be specified in protocols only}}
+ (int) C;
- (int)I;
@end
|