Fariborz Jahanian | 4b6df3f | 2007-10-04 00:22:33 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
Fariborz Jahanian | 25e077d | 2007-09-17 21:07:36 +0000 | [diff] [blame] | 3 | @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 |