blob: c1cd6294b7e33152e4701ee58c326e7c8bfdd031 [file] [log] [blame]
Chris Lattnerb5769332008-08-23 01:48:03 +00001// RUN: clang -fsyntax-only -verify %s
Chris Lattnerfd718262007-12-12 06:22:14 +00002
Fariborz Jahanian8473b222007-11-09 19:52:12 +00003@interface foo
4- (int)meth;
5@end
6
7@implementation foo
8- (int) meth { return [self meth]; }
9@end
10
Chris Lattnerb5769332008-08-23 01:48:03 +000011// PR2708
12@interface MyClass
13+- (void)myMethod; // expected-error {{expected selector for Objective-C method}}
14- (vid)myMethod2; // expected-error {{expected a type}}
15@end
16
17@implementation MyClass
18- (void)myMethod { }
19- (void)myMethod2 { }
20@end
21