1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 - (void) rootInstanceMethod;
7 @interface MyIntermediate: MyBase
10 @interface MyDerived: MyIntermediate
11 - (void) instanceMethod;
15 @implementation MyDerived
16 - (void) instanceMethod {
19 + (void) classMethod { /* If a class method is not found, the root */
20 [self rootInstanceMethod]; /* class is searched for an instance method */
21 [MyIntermediate rootInstanceMethod]; /* with the same name. */
23 [self instanceMethod];// expected-warning {{'+instanceMethod' not found (return type defaults to 'id')}}
24 [MyDerived instanceMethod];// expected-warning {{'+instanceMethod' not found (return type defaults to 'id')}}
28 @interface Object @end
31 - (void)setWindow:(Object *)wdw;
35 - (void)setWindow:(Class1 *)window;
43 [obj setWindow:nil]; // expected-warning {{'Object' may not respond to 'setWindow:'}}