1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
4 @property (assign) id foo; // expected-note 2 {{it could also be property of type 'id' declared here}} \\
5 // expected-warning {{property of type 'id' was selected for synthesis}}
9 @property double foo; // expected-warning 2 {{property of type 'double' was selected for synthesis}} \
10 // expected-note {{it could also be property of type 'double' declared here}}
14 @property short foo; // expected-note {{it could also be property of type 'short' declared here}}
17 @interface NSObject @end
19 @interface AnObject : NSObject<FooAsDouble,FooAsID>
22 @interface Sub : AnObject
26 @synthesize foo=_MyFooIvar; // expected-note {{property synthesized here}}
30 @interface AnotherObject : NSObject<FooAsDouble, FooAsID,FooAsDouble, FooAsID, FooAsDouble,FooAsID>
33 @implementation AnotherObject
34 @synthesize foo=_MyFooIvar; // expected-note {{property synthesized here}}
38 @interface YetAnotherObject : NSObject<FooAsID,FooAsShort, FooAsDouble,FooAsID, FooAsShort>
41 @implementation YetAnotherObject
42 @synthesize foo=_MyFooIvar; // expected-note {{property synthesized here}}
45 double func(YetAnotherObject *object) {
46 return [object foo]; // expected-error {{returning 'id' from a function with incompatible result type 'double'}}