// FIXME: Consider unifying with 'areComparableObjCPointerTypes'.
// It could return the composite type.
if (Context.canAssignObjCInterfaces(LHSOPT, RHSOPT)) {
- compositeType = LHSTy;
+ compositeType = RHSOPT->isObjCBuiltinType() ? RHSTy : LHSTy;
} else if (Context.canAssignObjCInterfaces(RHSOPT, LHSOPT)) {
- compositeType = RHSTy;
+ compositeType = LHSOPT->isObjCBuiltinType() ? LHSTy : RHSTy;
} else if ((LHSTy->isObjCQualifiedIdType() ||
RHSTy->isObjCQualifiedIdType()) &&
Context.ObjCQualifiedIdTypesAreCompatible(LHSTy, RHSTy, true)) {
--- /dev/null
+// RUN: clang-cc -fsyntax-only -verify %s
+
+@interface PBXBuildSettingsDictionary
+{
+ int i;
+}
+@end
+
+@interface XCConditionalBuildSettingsDictionary : PBXBuildSettingsDictionary
+{
+}
+@end
+
+@implementation PBXBuildSettingsDictionary
+
+- (XCConditionalBuildSettingsDictionary *)conditionalDictionaryForConditionSet
+{
+ return i ? self : (id)0;
+}
+
+- (XCConditionalBuildSettingsDictionary *)conditionalDictionaryForConditionSet2
+{
+ return i ? (id)0 : self;
+}
+@end
+
+