| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| @protocol SubFooable <Fooable> |
| @interface BClass : AClass <SubFooable> |
| void functionTakingAClassConformingToAProtocol(AClass <Fooable> *instance) { // expected-note {{passing argument to parameter 'instance' here}} |
| functionTakingAClassConformingToAProtocol(aobject); // expected-warning {{incompatible pointer types passing 'AClass *' to parameter of type 'AClass<Fooable> *'}} |
| functionTakingAClassConformingToAProtocol(bobject); // Shouldn't warn - does implement Fooable |
| @interface MyClass : NSObject |
| @interface MySubclass : MyClass <MyProtocol> |
| @interface MyTestClass : NSObject |
| NSObject <MyProtocol> *someObj; |
| @property (nonatomic, assign) NSObject <MyProtocol> *someObj; |
| @implementation MyTestClass |
| [self setSomeObj:foo]; // no warning here! |