// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
//rdar: //8591619
// pr8453
@protocolNSCopying@end@protocolNSPROTO@end@protocolNSPROTO1@end@protocolNSPROTO2@end@interfaceNSObject<NSCopying, NSPROTO, NSPROTO1>{Class isa;}@endvoidgorf(NSObject<NSCopying>*);// expected-note {{passing argument to parameter here}}
NSObject<NSCopying>*foo(id<NSCopying> bar,id id_obj){NSObject<NSCopying>*Init = bar;// expected-warning {{initializing 'NSObject<NSCopying> *' with an expression of incompatible type 'id<NSCopying>'}}
NSObject*Init1 = bar;// expected-warning {{initializing 'NSObject *' with an expression of incompatible type 'id<NSCopying>'}}
NSObject<NSCopying>*I = id_obj;NSObject*I1 = id_obj;gorf(bar);// expected-warning {{passing 'id<NSCopying>' to parameter of incompatible type 'NSObject<NSCopying> *'}}
gorf(id_obj);return bar;// expected-warning {{returning 'id<NSCopying>' from a function with incompatible result type 'NSObject<NSCopying> *'}}
}voidtest(id<NSCopying, NSPROTO, NSPROTO2>bar){NSObject<NSCopying>*Init = bar;// expected-warning {{initializing 'NSObject<NSCopying> *' with an expression of incompatible type 'id<NSCopying,NSPROTO,NSPROTO2>'}}
}// rdar://8843851
@interfaceNSObject(CAT)+ (struct S*)Meth:(struct S*)arg;@endstruct S {char*types;};@interfaceI@end@implementationI- (struct S *)Meth:(struct S*)a{return[NSObject Meth :a];}@end