blob: 6fb28b533cf7721f7dff8179e05b3cfb5188ee79 [file] [log] [blame]
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00001// RUN: clang -fsyntax-only -verify %s
2
Fariborz Jahanian25e077d2007-09-17 21:07:36 +00003@protocol PROTO1
4@required
5- (int) FooBar;
6@optional
7- (void) MyMethod1;
8+ (int) S;
9@end
10
11@interface INTF1
12@required // expected-error {{@required may be specified in protocols only}}
13- (int) FooBar;
14- (int) FooBar1;
15- (int) FooBar2;
16@optional // expected-error {{@optional may be specified in protocols only}}
17+ (int) C;
18
19- (int)I;
20@end