1 // RUN: %clang_cc1 -fsyntax-only -verify %s
7 @protocol SubFooable <Fooable>
13 @interface BClass : AClass <SubFooable>
16 @implementation BClass
21 void functionTakingAClassConformingToAProtocol(AClass <Fooable> *instance) { // expected-note {{passing argument to parameter 'instance' here}}
27 functionTakingAClassConformingToAProtocol(aobject); // expected-warning {{incompatible pointer types passing 'AClass *' to parameter of type 'AClass<Fooable> *'}}
28 functionTakingAClassConformingToAProtocol(bobject); // Shouldn't warn - does implement Fooable
32 @interface NSObject @end
37 @interface MyClass : NSObject
42 @implementation MyClass
45 @interface MySubclass : MyClass <MyProtocol>
50 @interface MyTestClass : NSObject
53 NSObject <MyProtocol> *someObj;
56 @property (nonatomic, assign) NSObject <MyProtocol> *someObj;
60 @implementation MyTestClass
67 [self setSomeObj:foo]; // no warning here!