2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2008-11-18 06:29:32 +08:00
|
|
|
|
|
|
|
@interface Foo
|
|
|
|
- iMethod;
|
|
|
|
+ cMethod;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface A
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface B : A
|
|
|
|
- (void)instanceMethod;
|
|
|
|
+ classMethod;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation B
|
|
|
|
|
|
|
|
- (void)instanceMethod {
|
|
|
|
[super iMethod]; // expected-warning{{method '-iMethod' not found (return type defaults to 'id')}}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ classMethod {
|
|
|
|
[super cMethod]; // expected-warning{{method '+cMethod' not found (return type defaults to 'id')}}
|
2009-07-22 08:43:08 +08:00
|
|
|
return 0;
|
2008-11-18 06:29:32 +08:00
|
|
|
}
|
|
|
|
@end
|
2008-11-19 23:54:23 +08:00
|
|
|
|
|
|
|
@interface XX
|
|
|
|
- m;
|
|
|
|
@end
|
|
|
|
|
|
|
|
void f(id super) {
|
|
|
|
[super m];
|
|
|
|
}
|
|
|
|
void f0(int super) {
|
2009-03-11 11:47:47 +08:00
|
|
|
[super m]; // expected-warning{{receiver type 'int' is not 'id'}} \
|
2009-03-10 05:19:16 +08:00
|
|
|
expected-warning {{method '-m' not found (return type defaults to 'id')}}
|
2008-11-19 23:54:23 +08:00
|
|
|
}
|
|
|
|
void f1(int puper) {
|
|
|
|
[super m]; // expected-error{{use of undeclared identifier 'super'}}
|
|
|
|
}
|