1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
5 @property (assign) id foo; // expected-note 2 {{it could also be property of type 'id' declared here}} \\
6 // expected-warning {{property of type 'id' was selected for synthesis}}
10 @property double foo; // expected-warning 2 {{property of type 'double' was selected for synthesis}} \
11 // expected-note {{it could also be property of type 'double' declared here}}
15 @property short foo; // expected-note {{it could also be property of type 'short' declared here}}
18 @interface NSObject @end
20 @interface AnObject : NSObject<FooAsDouble,FooAsID>
23 @interface Sub : AnObject
27 @synthesize foo=_MyFooIvar; // expected-note {{property synthesized here}}
31 @interface AnotherObject : NSObject<FooAsDouble, FooAsID,FooAsDouble, FooAsID, FooAsDouble,FooAsID>
34 @implementation AnotherObject
35 @synthesize foo=_MyFooIvar; // expected-note {{property synthesized here}}
39 @interface YetAnotherObject : NSObject<FooAsID,FooAsShort, FooAsDouble,FooAsID, FooAsShort>
42 @implementation YetAnotherObject
43 @synthesize foo=_MyFooIvar; // expected-note {{property synthesized here}}
46 double func(YetAnotherObject *object) {
47 return [object foo]; // expected-error {{returning 'id' from a function with incompatible result type 'double'}}