]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/objc.dg/property/property-neg-7.m
c-decl.c (start_decl): Adjust quoting and hyphenation in diagnostics.
[thirdparty/gcc.git] / gcc / testsuite / objc.dg / property / property-neg-7.m
CommitLineData
e2673f71 1/* { dg-do compile } */
e2673f71
IS
2
3@interface NSArray
46a88c12
NP
4{
5 int count;
6}
e2673f71
IS
7@property(readonly) int count;
8@end
9
10@implementation NSArray
46a88c12 11@synthesize count;
e2673f71
IS
12@end
13
14void foo (NSArray *ans[], id pid, id apid[], int i) {
15 NSArray *test;
0ecf545c
MS
16 test.count = 1; /* { dg-error "'readonly' property cannot be set" } */
17 ((NSArray *)pid).count = 1; /* { dg-error "'readonly' property cannot be set" } */
18 ((NSArray *)apid[i]).count = 1; /* { dg-error "'readonly' property cannot be set" } */
19 ans[i].count = 3; /* { dg-error "'readonly' property cannot be set" } */
e2673f71 20}