2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
2008-12-06 06:32:48 +08:00
|
|
|
|
|
|
|
@interface I {
|
|
|
|
int Y;
|
|
|
|
}
|
|
|
|
@property int X;
|
|
|
|
@property int Y;
|
|
|
|
@property int Z;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I
|
|
|
|
@dynamic X; // expected-note {{previous declaration is here}}
|
|
|
|
@dynamic X; // expected-error {{property 'X' is already implemented}}
|
|
|
|
@synthesize Y; // expected-note {{previous use is here}}
|
2012-09-25 06:00:36 +08:00
|
|
|
@synthesize Z=Y; // expected-error {{synthesized properties 'Z' and 'Y' both claim instance variable 'Y'}}
|
2008-12-06 06:32:48 +08:00
|
|
|
@end
|
2010-12-04 07:37:08 +08:00
|
|
|
|
|
|
|
// rdar://8703553
|
|
|
|
@interface IDEPathCell
|
|
|
|
{
|
|
|
|
@private
|
|
|
|
id _gradientStyle;
|
|
|
|
}
|
|
|
|
|
|
|
|
@property (readwrite, assign, nonatomic) id gradientStyle;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation IDEPathCell
|
|
|
|
|
|
|
|
@synthesize gradientStyle = _gradientStyle;
|
|
|
|
- (void)setGradientStyle:(id)value { }
|
|
|
|
|
2012-07-28 03:07:44 +08:00
|
|
|
+ (id)_componentCellWithRepresentedObject {
|
|
|
|
return self.gradientStyle;
|
2010-12-04 07:37:08 +08:00
|
|
|
}
|
|
|
|
@end
|
2012-05-16 06:37:04 +08:00
|
|
|
|
2012-05-30 03:59:25 +08:00
|
|
|
// rdar://11054153
|
|
|
|
@interface rdar11054153
|
2012-05-16 06:37:04 +08:00
|
|
|
@property int P; // expected-error {{type of property 'P' ('int') does not match type of accessor 'P' ('void')}}
|
|
|
|
- (void)P; // expected-note {{declared here}}
|
|
|
|
|
|
|
|
@property int P1; // expected-warning {{type of property 'P1' does not match type of accessor 'P1'}}
|
|
|
|
- (double) P1; // expected-note {{declared here}}
|
|
|
|
|
|
|
|
@property int P2; // expected-error {{type of property 'P2' ('int') does not match type of accessor 'P2' ('double *')}}
|
|
|
|
- (double*)P2; // expected-note {{declared here}}
|
|
|
|
|
|
|
|
@end
|