| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| - (void) rootInstanceMethod; |
| @interface MyIntermediate: MyBase |
| @interface MyDerived: MyIntermediate |
| @implementation MyDerived |
| - (void) instanceMethod { |
| + (void) classMethod { /* If a class method is not found, the root */ |
| [self rootInstanceMethod]; /* class is searched for an instance method */ |
| [MyIntermediate rootInstanceMethod]; /* with the same name. */ |
| [self instanceMethod];// expected-warning {{'+instanceMethod' not found (return type defaults to 'id')}} |
| [MyDerived instanceMethod];// expected-warning {{'+instanceMethod' not found (return type defaults to 'id')}} |
| - (void)setWindow:(Object *)wdw; |
| - (void)setWindow:(Class1 *)window; |
| [obj setWindow:nil]; // expected-warning {{'Object' may not respond to 'setWindow:'}} |