aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/overriding-property-in-class-extension.m
blob: 8c0e1b98a572b13b7b7a2a1cfc2d873f493b24f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// RUN: %clang_cc1  -fsyntax-only -verify -Weverything %s
// rdar://12103434

@class NSString;

@interface NSObject @end

@interface MyClass  : NSObject

@property (nonatomic, copy, readonly) NSString* name; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}}

@end

@interface MyClass () {
    NSString* _name;
}

@property (nonatomic, copy) NSString* name;

@end

@implementation MyClass

@synthesize name = _name;

@end