1 // RUN: %clang_cc1 -verify -Wno-objc-root-class -fsyntax-only %s
3 @interface NSArray<__covariant ObjectType>
4 - (void)containsObject:(ObjectType)anObject; // expected-note {{passing argument to parameter 'anObject' here}}
8 typedef __attribute__((NSObject)) struct Foo *FooRef;
9 typedef struct Bar *BarRef;
13 NSArray<FooRef> *array;
14 [array containsObject:object];
20 NSArray<BarRef> *array; // expected-error {{type argument 'BarRef' (aka 'struct Bar *') is neither an Objective-C object nor a block type}}
21 [array containsObject:object]; // expected-warning {{incompatible pointer types sending 'BarRef' (aka 'struct Bar *') to parameter of type 'id'}}
22 [object description]; // expected-warning {{receiver type 'BarRef' (aka 'struct Bar *') is not 'id' or interface pointer, consider casting it to 'id'}}