2011-10-02 09:16:38 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-04-14 03:30:37 +08:00
|
|
|
|
|
|
|
@interface Super {
|
2009-04-30 05:45:02 +08:00
|
|
|
id value2; // expected-note {{previously declared 'value2' here}}
|
2009-04-14 03:30:37 +08:00
|
|
|
}
|
|
|
|
@property(retain) id value;
|
|
|
|
@property(retain) id value1;
|
2009-04-30 05:45:02 +08:00
|
|
|
@property(retain) id prop;
|
2009-04-14 03:30:37 +08:00
|
|
|
@end
|
|
|
|
|
2009-04-30 05:45:02 +08:00
|
|
|
@interface Sub : Super
|
|
|
|
{
|
|
|
|
id value;
|
|
|
|
}
|
|
|
|
@end
|
2009-04-14 03:30:37 +08:00
|
|
|
|
|
|
|
@implementation Sub
|
2009-04-30 05:45:02 +08:00
|
|
|
@synthesize value; // expected-note {{previous use is here}}
|
2012-09-25 06:00:36 +08:00
|
|
|
@synthesize value1=value; // expected-error {{synthesized properties 'value1' and 'value' both claim instance variable 'value'}}
|
|
|
|
@synthesize prop=value2; // expected-error {{property 'prop' attempting to use instance variable 'value2' declared in super class 'Super'}}
|
2009-04-14 03:30:37 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
|