blob: be2397bd20078a783d388f63d4aea3aae3d9aed5 [file] [log] [blame]
Fariborz Jahanian77e2dde2010-02-09 21:49:50 +00001// RUN: %clang_cc1 -fsyntax-only -fobjc-nonfragile-abi2 -verify %s
2
3@interface NSString @end
4
5@interface NSObject @end
6
7@interface SynthItAll
8@property int howMany;
9@property (retain) NSString* what;
10@end
11
12@implementation SynthItAll
13//@synthesize howMany, what;
14@end
15
16
17@interface SynthSetter : NSObject
18@property (nonatomic) int howMany; // REM: nonatomic to avoid warnings about only implementing one of the pair
19@property (nonatomic, retain) NSString* what;
20@end
21
22@implementation SynthSetter
23//@synthesize howMany, what;
24
25- (int) howMany {
26 return howMany;
27}
28// - (void) setHowMany: (int) value
29
30- (NSString*) what {
31 return what;
32}
33// - (void) setWhat: (NSString*) value
34@end
35
36
37@interface SynthGetter : NSObject
38@property (nonatomic) int howMany; // REM: nonatomic to avoid warnings about only implementing one of the pair
39@property (nonatomic, retain) NSString* what;
40@end
41
42@implementation SynthGetter
43//@synthesize howMany, what;
44
45// - (int) howMany
46- (void) setHowMany: (int) value {
47 howMany = value;
48}
49
50// - (NSString*) what
51- (void) setWhat: (NSString*) value {
52 if (what != value) {
53 }
54}
55@end
56
57
58@interface SynthNone : NSObject
59@property int howMany;
60@property (retain) NSString* what;
61@end
62
63@implementation SynthNone
64//@synthesize howMany, what; // REM: Redundant anyway
65
66- (int) howMany {
67 return howMany;
68}
69- (void) setHowMany: (int) value {
70 howMany = value;
71}
72
73- (NSString*) what {
74 return what;
75}
76- (void) setWhat: (NSString*) value {
77 if (what != value) {
78 }
79}
80@end
81