annotate clang/test/SemaObjC/duplicate-property-class-extension.m @ 180:680fa57a2f20

fix compile errors.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 30 May 2020 17:44:06 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
2 // rdar://7629420
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 @interface Foo
anatofuz
parents:
diff changeset
5 @property (readonly) char foo;
anatofuz
parents:
diff changeset
6 @property (readwrite) char bar; // expected-note {{property declared here}}
anatofuz
parents:
diff changeset
7 @end
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 @interface Foo ()
anatofuz
parents:
diff changeset
10 @property (readwrite) char foo; // expected-note 2 {{property declared here}}
anatofuz
parents:
diff changeset
11 @property (readwrite) char NewProperty; // expected-note 2 {{property declared here}}
anatofuz
parents:
diff changeset
12 @property (readwrite) char bar; // expected-error{{illegal redeclaration of 'readwrite' property in class extension 'Foo' (perhaps you intended this to be a 'readwrite' redeclaration of a 'readonly' public property?)}}
anatofuz
parents:
diff changeset
13 @end
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 @interface Foo ()
anatofuz
parents:
diff changeset
16 @property (readwrite) char foo; // expected-error {{property has a previous declaration}}
anatofuz
parents:
diff changeset
17 @property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}}
anatofuz
parents:
diff changeset
18 @end
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 @interface Foo ()
anatofuz
parents:
diff changeset
21 @property (readonly) char foo; // expected-error {{property has a previous declaration}}
anatofuz
parents:
diff changeset
22 @property (readwrite) char NewProperty; // expected-error {{property has a previous declaration}}
anatofuz
parents:
diff changeset
23 @end
anatofuz
parents:
diff changeset
24