blob: 9afd4eb983c57f4275d60bd6bf63921edfa96650 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Steve Naroff87d3ef02008-11-17 22:29:32 +00002
3@interface Foo
4- iMethod;
5+ cMethod;
6@end
7
8@interface A
9@end
10
11@interface B : A
12- (void)instanceMethod;
13+ classMethod;
14@end
15
16@implementation B
17
18- (void)instanceMethod {
19 [super iMethod]; // expected-warning{{method '-iMethod' not found (return type defaults to 'id')}}
20}
21
22+ classMethod {
23 [super cMethod]; // expected-warning{{method '+cMethod' not found (return type defaults to 'id')}}
24}
25@end
Steve Naroff5cb93b82008-11-19 15:54:23 +000026
27@interface XX
28- m;
29@end
30
31void f(id super) {
32 [super m];
33}
34void f0(int super) {
Chris Lattner4018a282009-03-11 03:47:47 +000035 [super m]; // expected-warning{{receiver type 'int' is not 'id'}} \
Chris Lattner0c73f372009-03-09 21:19:16 +000036 expected-warning {{method '-m' not found (return type defaults to 'id')}}
Steve Naroff5cb93b82008-11-19 15:54:23 +000037}
38void f1(int puper) {
39 [super m]; // expected-error{{use of undeclared identifier 'super'}}
40}