bool typesAreCompatible(QualType T1, QualType T2,
bool CompareUnqualified = false); // C99 6.2.7p1
+ bool propertyTypesAreCompatible(QualType, QualType);
bool typesAreBlockPointerCompatible(QualType, QualType);
bool isObjCIdType(QualType T) const {
return !mergeTypes(LHS, RHS, false, CompareUnqualified).isNull();
}
+bool ASTContext::propertyTypesAreCompatible(QualType LHS, QualType RHS) {
+ return !mergeTypes(LHS, RHS, false, false).isNull();
+}
+
bool ASTContext::typesAreBlockPointerCompatible(QualType LHS, QualType RHS) {
return !mergeTypes(LHS, RHS, true).isNull();
}
QualType RHSType =
Context.getCanonicalType(Property->getType());
- if (!Context.typesAreCompatible(LHSType, RHSType)) {
+ if (!Context.propertyTypesAreCompatible(LHSType, RHSType)) {
// FIXME: Incorporate this test with typesAreCompatible.
if (LHSType->isObjCQualifiedIdType() && RHSType->isObjCQualifiedIdType())
if (Context.ObjCQualifiedIdTypesAreCompatible(LHSType, RHSType, false))
--- /dev/null
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar://9740328
+
+@protocol P1;
+
+@interface NSObject
+@end
+
+@interface A : NSObject
+@property (assign) NSObject<P1> *prop;
+@end
+
+@protocol P2 <P1>
+@end
+
+@interface B : A
+@property (assign) NSObject<P2> *prop;
+@end
+