2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
2008-12-28 07:47:34 +08:00
|
|
|
|
2008-12-07 07:03:39 +08:00
|
|
|
@protocol P
|
2011-10-12 08:00:57 +08:00
|
|
|
@property(readonly) int X; // expected-note {{property declared here}}
|
2008-12-07 07:03:39 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol P1<P>
|
|
|
|
@property (copy) id ID;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I (Cat) <P>
|
2009-03-03 23:49:23 +08:00
|
|
|
@property float X; // expected-warning {{property type 'float' is incompatible with type 'int' inherited from 'P'}}
|
2008-12-07 07:03:39 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I (Cat2) <P1>
|
2013-02-10 08:16:04 +08:00
|
|
|
@property (retain) id ID; // expected-warning {{'copy' attribute on property 'ID' does not match the property inherited from 'P1'}}
|
2008-12-07 07:03:39 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
|
2008-12-23 03:05:31 +08:00
|
|
|
@interface A
|
|
|
|
@property(assign) int categoryProperty;
|
|
|
|
@end
|
|
|
|
|
|
|
|
// Don't issue warning on unimplemented setter/getter
|
|
|
|
// because property is @dynamic.
|
|
|
|
@implementation A
|
|
|
|
@dynamic categoryProperty;
|
|
|
|
@end
|