// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s
voidtakevoidptr(void*);@interfaceFoo- iMethod;+ cMethod;@end@interfaceA+ superClassMethod;- (void)instanceMethod;@end@interfaceB:A- (void)instanceMethod;+ classMethod;@end@implementationB- (void)instanceMethod{[superiMethod];// expected-warning{{'A' may not respond to 'iMethod'}}
// Use of super in a block is ok and does codegen to the right thing.
// rdar://7852959
takevoidptr(^{[superinstanceMethod];});}+ classMethod {[supercMethod];// expected-warning{{method '+cMethod' not found (return type defaults to 'id')}}
id X[]={[supersuperClassMethod]};id Y[]={[super.superClassMethod iMethod],super.superClassMethod,(id)super.superClassMethod// not a cast of super: rdar://7853261
};return0;}@end@interfaceXX- m;@endvoidf(id super){[superm];}voidf0(intsuper){[superm];// expected-warning{{receiver type 'int' is not 'id'}}
}voidf1(id puper){// expected-note {{'puper' declared here}}
[superm];// expected-error{{use of undeclared identifier 'super'}}
}// radar 7400691
typedef Foo super;typedef Foo FooTD;voidtest(void){[FooTD cMethod];[supercMethod];}structSomeStruct{int X;};inttest2(void){struct SomeStruct super={0};returnsuper.X;}inttest3(void){id super=0;[(B*)super instanceMethod];int*s1 =(int*)super;id X[]={[supersuperClassMethod]};return0;}