summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/duplicate-property-class-extension.m
blob: a84f83f81fd77ce00d94db9625f2af5b0c580ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: %clang_cc1  -fsyntax-only -verify %s

@interface Foo 
@property (readonly) char foo; // expected-note {{property declared here}}
@end

@interface Foo ()
@property (readwrite) char foo; // OK 
@property (readwrite) char NewProperty; // expected-note 2 {{property declared here}} 
@end

@interface Foo ()
@property (readwrite) char foo;	//  OK again, make primary property readwrite for 2nd time!
@property (readwrite) char NewProperty; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}}
@end

@interface Foo ()
@property (readonly) char foo;	// expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}}
@property (readwrite) char NewProperty; // expected-error {{illegal declaration of property in continuation class 'Foo': attribute must be readwrite, while its primary must be readonly}}
@end

OpenPOWER on IntegriCloud