GetterMethod->getResultType() != property->getType()) {
AssignConvertType result = Incompatible;
if (Context.isObjCObjectPointerType(property->getType()))
- result = CheckAssignmentConstraints(property->getType(),
- GetterMethod->getResultType());
+ result = CheckAssignmentConstraints(GetterMethod->getResultType(), property->getType());
if (result != Compatible) {
Diag(Loc, diag::warn_accessor_property_type_mismatch)
<< property->getDeclName()
NSArray* first;
}
-@property (readonly) NSArray* pieces;
-@property (readonly) NSMutableArray* first; // expected-warning {{type of property 'first' does not match type of accessor 'first'}}
+@property (readonly) NSArray* pieces; // expected-warning {{type of property 'pieces' does not match type of accessor 'pieces'}}
+@property (readonly) NSMutableArray* first;
-- (NSMutableArray*) pieces;
-- (NSArray*) first; // expected-note {{declared at}} // expected-note {{declared at}}
+- (NSMutableArray*) pieces; // expected-note {{declared at}} // expected-note {{declared at}}
+- (NSArray*) first;
@end
@interface Class2 {
- (id) lastPiece
{
- return container.pieces;
+ return container.pieces; // expected-warning {{type of property 'pieces' does not match type of accessor 'pieces'}}
}
- (id)firstPeice
{
- return container.first; // expected-warning {{type of property 'first' does not match type of accessor 'first'}}
+ return container.first;
}
@end